|more useful options|
Implementing Log::Log4perlby horrendo (Sexton)
|on Aug 10, 2008 at 23:56 UTC||Need Help??|
horrendo has asked for the
wisdom of the Perl Monks concerning the following question:
I am looking at replacing our existing logging mechanism with Log::Log4perl.
The current mechanism is very simple. We have a base class that all classes inherit from. That class defines 2 methods - ->feedback and ->notify. The ->feedback method outputs to stdout and ->notify outputs to stderr.
I was hoping to set up Log4perl with a default initialisation file to mimic the current functionality (for backward compatibility) while allowing projects to take advantage of the power of Log4perl at their leisure.
Here is my initial stab at a config file ...
The question I have is to do with Log4perl levels and their corresponding Log::Dispatch levels. From what I can see, the 'lowest' level for Log::Dispatch is 'warning', whereas the lowest level for Log4perl is trace. Using the above config file, I was hoping to have anything output via ->warn, ->debug, ->info, or ->trace to be output to stdout. I can't seem to get ->trace messages to appear on stdout.
Any clues (or comments on my implementation)?