I am using this simple snippet of code to do the logging in my ipl. The issue here is when i try to run it from shell (iwperl yyy.ipl), it works fine and it even does logging in ****.log. but when i try using this same ipl from browser
http://teamsite/iw-bin/yyy.ipl. it throws a software error. Can some tell me if this has to do anything with the permissions?...any kind of help is appreciated
TS Ver : 7.2.1
OS: Linux
code:
our $logger;
setlog("$iwhome/local/logs/****.log");
sub setlog {
my $logfile = shift;
my $log_conf = qq(
log4perl.rootLogger=DEBUG, LOGFILE
log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.filename=$logfile
log4perl.appender.LOGFILE.mode=append
log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern =\%d \%p > \%F{1}:\%L - \%m\%n
);
Log::Log4perl->init(\$log_conf);
$logger = Log::Log4perl->get_logger();
}
Thanks
Archie