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!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dependency to Log::Log4perl
by salva (Canon) on Feb 03, 2020 at 09:00 UTC | |
by Dirk80 (Pilgrim) on Feb 04, 2020 at 13:30 UTC | |
Re: Dependency to Log::Log4perl
by Corion (Patriarch) on Feb 03, 2020 at 08:54 UTC |