From: Withers J. Z <Joh...@ir...> - 2007-03-19 13:16:30
|
Mike, Thanks for the clarification. I was able to use Log4perl::Appender::Screen directly. However, my original thinking was that the logging properties would be shared between Java programs and PERL scripts. It appeared that the Log4J configuration was necessary to make this work. I could always defined the PERL logger using log4per.appender.APPLOG and the Java logger using log4j.appender.APPLOG, but this give me two (2) sets of nearly identical properties to maintain. John John Withers=20 -----Original Message----- From: Mike Schilli [mailto:m...@pe...]=20 Sent: Sunday, March 18, 2007 1:46 AM To: Withers John Z Cc: log...@li... Subject: Re: [log4perl-devel] Bugs in Log::Log4perl::JavaMap On Fri, 16 Mar 2007, Withers John Z wrote: > I've encountered what appear to be bugs in Log::Log4perl::JavaMap/* > (version 1.09). > > When the property file includes: > > log4j.appender.APPLOG =3D or.apache.log4j.ConsoleAppender > > My PERL script fails because Log/Dispatch/Screen.pm can't be located. > It isn't included with the distribution. It appears that > Log::Log4perl::JavaMap::ConsoleAppender.pm (and others) maps the > property value to the wrong class. > Log::Log4perl::JavaMap::ConsoleAppender->new tries to map to > Log::Dispatch::Screen when it probably should map to > Log::Log4perl::Appender::Screen. Hi John, the JavaMap ConsoleAppender dates back to the days when Log4perl didn't have its own screen appender, so it uses Log::Dispatch::Screen. It doesn't come with the Log4perl distribution, but it can be downloaded from CPAN: =20 http://search.cpan.org/~drolsky/Log-Dispatch-2.16/lib/Log/Dispatch.pm Of course, you could just use Log::Log4perl::Appender::Screen directly, any particular reason why you're using the JavaMap? Not that there's anything wrong with it, I'm just curious. -- Mike Mike Schilli m...@pe... |