frazap has asked for the wisdom of the Perl Monks concerning the following question:
So that in my tests I can get the message from unfolder in a file distinct from other parts. That's ok.use Moo; use Log::Any; has 'log' => ( is => 'ro', default => sub { Log::Any->get_logger( category => "unfolder" +) }, ); # and below $self->log->debug("bla");
Now, I want to turn off the logging from the unfolder category. I thought that
has 'log' => ( is => 'ro', default => sub { Log::Any->get_logger( category => "unfolder" +, 'log_level' => "critical" ) }, ); #and below $self->log->debug("message");
for someone using my module with just
use Log::Any::Adapter( 'File', './log.txt' );
Would do the trick, but no, I still have all the messages from the unfolder part in the log.txt.
What am I missing ?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Turning off logging
by 1nickt (Canon) on Oct 31, 2018 at 15:51 UTC | |
by frazap (Monk) on Nov 05, 2018 at 14:39 UTC | |
by hippo (Archbishop) on Nov 05, 2018 at 14:47 UTC |