in reply to logging and cron jobs
in Log4perl you can do one log file per script by using a perl hook..
So in your log4perl config do..
log4perl.logger = DEBUG,LOGFILE
log4perl.appender.LOGFILE = Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.filename = sub { return '/tmp/log.'.$$.'.log' }
log4perl.appender.LOGFILE.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern =%d %c - %m%n
And to print out WHERE thats logging to do..
print Log::Log4perl->appender_by_name('LOGFILE')->filename();
|
|---|