From: Mike S. <m...@pe...> - 2009-10-05 15:31:17
|
On Mon, 5 Oct 2009, Ronald Fischer wrote: > I have defined a screen appender like this: > log4perl.appender.Screen=Log::Log4perl::Appender::Screen > log4perl.appender.Screen.layout=Log::Log4perl::Layout::PatternLayout > log4perl.appender.Screen.layout.ConversionPattern=%.1p %d{HH:mm} > %M{2}(%L) %m%n > But when I run my program with redirection, say > myprog.pl .... >screen.log > the logging output still is displayed on the console, and screen.log > ends up with length zero. By default, the screen appender writes to STDERR, which your redirection doesn't capture. To have it to write to STDOUT instead, use log4perl.appender.Screen.stderr = 0 in your configuration file. -- Mike Mike Schilli m...@pe... |