May 2012 Archives

Log4perl: Category Logging at a Different Level than Root

(This is probably intuitively obvious to everyone else...)

Here is a sample Log::Log4perl configuration where the root logs at WARN, package 'Joe' logs at 'INFO', and package 'Zoe::Marie' logs at ERROR:

log4perl.rootLogger=WARN, LOGFILE log4perl.logger.Joe=INFO, LOGFILE log4perl.logger.Zoe.Marie=ERROR, LOGFILE

log4perl.additivity.Joe = 0
log4perl.additivity.Zoe.Marie = 0


About Mark Leighton Fisher

user-pic Perl/CPAN user since 1992.