Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Methods for simple logging from modulesby Anonymous Monk |
on Jul 07, 2011 at 07:47 UTC ( [id://913143]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: I must confess that I lived a long time without logging and most modules on CPAN seem to implement no internal logging. I gave Log4Perl a try, but just could not get familiar with its complexity. The approach of lightweight modules like Log::Any and Log::Contextual that separate logger calling one one side, and logger configuration and actual logging on the other, looks more appealing. Log:Any seems to gain popularity, but also Log:Contextual (it's in Task::Kensho). I prefer the calling syntax of the second because the actual method is in a sub:
On the other hand Log::Any has almost the best way to include it in your module:
My ideal logger calling module should be included as use Log::Module; # no more configuration!Do you know of any actual comparision of logging from Perl modules? Are there other pros and cons if you compare Log::Any and Log::Contextual or do you prefer a third module?
Back to
Seekers of Perl Wisdom
|
|