Log::Log4perl sending DEBUG and above to a file and WARN and above to the screen
Edwardson, Tony
Tony.Edwardson at commerzbank.com
Thu May 8 02:50:04 PDT 2008
Hi
I'm working with some code which uses Log::Log4perl with a config like this :-
my %settings = (
'log4perl.rootLogger' => 'DEBUG, LOGFILE',
'log4perl.category.rrdtool' => 'WARN, LOGFILE',
'log4perl.category.RRDTool.OO' => 'WARN, LOGFILE',
'log4perl.appender.LOGFILE' => 'Log::Log4perl::Appender::File',
'log4perl.appender.LOGFILE.filename' => $filename,
'log4perl.appender.LOGFILE.layout' => 'PatternLayout',
'log4perl.appender.LOGFILE.layout.ConversionPattern' =>
'[%d] %-20F{1} %-5p - %-6P - %m%n',
);
Log::Log4perl->init( \%settings );
Which logs all output to a log file and nothing goes to the screen.
The trouble with this is that when an error happens, it only gets written to the log file and nothing goes to the screen so unless you check the response code and/or the log file you don't know when something failed.
Anyone know of a way to get the rootLogger to additionally send errors to STDERR so I get to see them without introducing new categories ?
Regards/Mit freundlichen Grüßen,
Tony Edwardson
Commerzbank AG
Commerzbank Corporates & Markets
ZIT-A CMA / Murex IT Team London
60 Gracechurch Street
London EC3V 0HR
United Kingdom
+44-207-469-3628
tony.edwardson at commerzbank.com
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/miltonkeynes-pm/attachments/20080508/1a21461a/attachment.html
More information about the MiltonKeynes-pm
mailing list