Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Log4Perl issue

by palette (Scribe)
on Jan 03, 2007 at 16:26 UTC ( #592785=note: print w/replies, xml ) Need Help??


in reply to Re: Log4Perl issue
in thread Log4Perl issue

The issue is sometimes I am able to see module 'a' log in the a.log file.
But in case module 'b'is running then module a's log is written in b.log


log4perl.logger.a = DEBUG, a
log4perl.b=DEBUG, b
log4perl.appender.a = Log::Log4perl::Appender::File
log4perl.appender.a.filename = a.log
log4perl.appender.a.max = 15
log4perl.appender.a.DatePattern = yyyy-MM-dd
log4perl.appender.a.mode = append
log4perl.appender.a.TZ = BST
log4perl.appender.a.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.a.layout.ConversionPattern = %d %c - %m%n

log4perl.appender.b=Log::Dispatch::File
log4perl.appender.b.filename=b.log
log4perl.appender.b.mode=append
log4perl.appender.b.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.b.layout.ConversionPattern = %d %c - %m%n


package a;
BEGIN {
Log::Log4perl::init_and_watch('/etc/log4perl.conf',30);
$__PACKAGE__::mylog=Log::Log4perl->get_logger();
}


the module b is defined inside b.pl script
BEGIN {
package b;
Log::Log4perl::init_and_watch('log4perl.conf',30);
$__PACKAGE__::mylog=Log::Log4perl->get_logger(__PACKAGE__);
}



Replies are listed 'Best First'.
Re^3: Log4Perl issue
by Anonymous Monk on Jan 03, 2007 at 18:50 UTC
    What is log4perl.b=DEBUG, b?
      Sorry!!
      It's typo its log4perl.logger.b = DEBUG, b

      But anyway in the code its fine.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2023-11-28 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?