--- trunk/lib/WebPAC/Common.pm 2005/07/16 17:14:43 9 +++ trunk/lib/WebPAC/Common.pm 2005/07/16 20:35:30 10 @@ -315,7 +315,8 @@ $webpac->_init_logger('/path/to/log.conf'); If no path to configuration file is given, dummy empty configuration -will be create. +will be created. If any mode which inherits from this one is called +with C flag, it will turn logging to debug level. =cut @@ -326,6 +327,19 @@ Log::Log4perl->init($file); } else { my $conf = q( ); + if ($self->{'debug'}) { + $conf = << '_log4perl_'; + +log4perl.rootLogger=INFO, SCREEN + +log4perl.logger.WebPAC.=DEBUG + +log4perl.appender.SCREEN=Log::Log4perl::Appender::Screen +log4perl.appender.SCREEN.layout=PatternLayout +log4perl.appender.SCREEN.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n + +_log4perl_ + } Log::Log4perl->init( \$conf ); } }