I would like to use Log4perl in the project, but disable it for a specific class (which in this case is Net :: Amazon). I thought it would be easy, but somehow I failed.
I tried to use
use Log::Log4perl (:easy_init); use Net::Amazon; my $amz = Net::Amazon->new( ... ); my $log = Log::Log4perl->easy_init($DEBUG); $log = $log->get_logger("Net::Amazon"); $log->level($OFF); $log = $log->get_logger(__PACKAGE__); $log->info("Hello World.");
Unfortunately, Net :: Amazon debugging messages are still printed on the terminal. Why is this? And what am I doing wrong here?
Simon source share