Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Log::Log4Perl best practices

by water (Deacon)
on Jun 03, 2004 at 10:25 UTC ( #360039=note: print w/replies, xml ) Need Help??


in reply to Re: Log::Log4Perl best practices
in thread Log::Log4Perl best practices

If the modules use stealth logging,
package MyPackage; use Log::Log4perl qw(:easy); sub method { DEBUG "Doing something!"; }
How does the main driver turn debugging on an off?
use Log::Log4perl qw(:levels); Log::Log4perl->init("/home/mycode/log4perl-conf.txt"); my $logger = Log::Log4perl->get_logger; $logger->level($DEBUG);
is not "seen" by the module.

Or am I just not getting it by trying to set levels in my code, rather than in the conf file? I don't envision using the 'change logging level while code is running' feature, and it seems more direct to me to set the log level in the code, rather than in the conf file. I'm really just using the conf file for appender & filter specification, it seems.

Thanks for any clarification. Mike, your advice has been great, thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://360039]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2019-10-18 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?