We don't bite newbies here... much | |
PerlMonks |
Dependency to Log::Log4perlby Dirk80 (Pilgrim) |
on Feb 03, 2020 at 08:50 UTC ( [id://11112311]=perlquestion: print w/replies, xml ) | Need Help?? |
Dirk80 has asked for the wisdom of the Perl Monks concerning the following question: Currently I'm using no logger in my modules. I just use die, warn, croak and carp. I want to change that. After a short investigation I saw that Log::Log4perl is the logger I want to use. But now I'm not sure if I should use it directly or not. Or in other words. If my modules should have a dependency on it. I've seen the following message from cpan: Loading internal logger. Log::Log4perl recommended for better loggingSo cpan has an internal logger. And if Log::Log4perl is available then this logger is used. So there is no hard dependency. What is your opinion? Should I also use an internal logger, e.g. My::Log and only use Log::Log4perl if it is available? I would like to do that this way. I don't want to invent things which are already there. So another question. Is there already an implementation of an internal logger (is it a wrapper class around Log::Log4perl?) ? Thanks for your help!
Back to
Seekers of Perl Wisdom
|
|