/[webpac2]/trunk/lib/WebPAC/Common.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Common.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Sat Jul 16 17:14:43 2005 UTC revision 10 by dpavlin, Sat Jul 16 20:35:30 2005 UTC
# Line 315  This function will init C<Log::Log4perl> Line 315  This function will init C<Log::Log4perl>
315    $webpac->_init_logger('/path/to/log.conf');    $webpac->_init_logger('/path/to/log.conf');
316    
317  If no path to configuration file is given, dummy empty configuration  If no path to configuration file is given, dummy empty configuration
318  will be create.  will be created. If any mode which inherits from this one is called
319    with C<debug> flag, it will turn logging to debug level.
320    
321  =cut  =cut
322    
# Line 326  sub _init_logger { Line 327  sub _init_logger {
327                  Log::Log4perl->init($file);                  Log::Log4perl->init($file);
328          } else {          } else {
329                  my $conf = q( );                  my $conf = q( );
330                    if ($self->{'debug'}) {
331                            $conf = << '_log4perl_';
332    
333    log4perl.rootLogger=INFO, SCREEN
334    
335    log4perl.logger.WebPAC.=DEBUG
336    
337    log4perl.appender.SCREEN=Log::Log4perl::Appender::Screen
338    log4perl.appender.SCREEN.layout=PatternLayout
339    log4perl.appender.SCREEN.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n
340    
341    _log4perl_
342                    }
343                  Log::Log4perl->init( \$conf );                  Log::Log4perl->init( \$conf );
344          }          }
345  }  }

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26