use strict; use warnings; use Log::Log4perl; my $log_conf1 = <<EOT; log4perl.rootLogger=DEBUG, Screen1, Screen2 log4perl.appender.Screen1=Log::Log4perl::Appender::Screen log4perl.appender.Screen1.stderr=0 log4perl.appender.Screen1.layout=Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen1.layout.ConversionPattern = %d %-1.1p %P %H % +m %n log4perl.appender.Screen2=Log::Log4perl::Appender::Screen log4perl.appender.Screen2.stderr=0 log4perl.appender.Screen2.layout=Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen2.layout.ConversionPattern = %d %-1.1p %P %H % +m %n EOT Log::Log4perl->init(\$log_conf1); Log::Log4perl->eradicate_appender("Screen1"); my $log = Log::Log4perl->get_logger; $log->debug('this is a test');
In reply to Re^4: How to turn off a Log4perl appender?
by saintmike
in thread How to turn off a Log4perl appender?
by mifflin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |