Help for this page

Select Code to Download


  1. or download this
      my $log = Log::Log4perl->get_logger("SomeCategory);
    
    ...
     # Logging code looks the same, but no longer gets logged
     # to both places
     $log->info("connecting to database");
    
  2. or download this
     # Prevent the message from bubbling up to it's parents 
     # by setting the logger's additivity to 0 in the config 
    ...
     # Tell a given appender not to accept messages
     # unless they were logged at a particular level
     logger.appender.log.theshold = FATAL