in reply to Leave log4perl debug code in cpan module?
Why not make Log::Log4perl a Prerequisite for your module? That way, your users can decide whether or not they want to see the log messages...
I've decided on needing Log::Log4perl with WWW::Mechanize::Chrome instead of writing another logging implementation myself, to give others the chance of reusing and integrating it.
The downside I've found is that now every script and test script also has to initialize Log::Log4perl or a warning will be issued. But that's just two lines of configuration:
use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($ERROR);
And whenever I need more information, I have to change $ERROR to $TRACE (or maybe $DEBUG).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Leave log4perl debug code in cpan module?
by nysus (Parson) on Jan 29, 2018 at 22:28 UTC |