From: Mike S. <m...@pe...> - 2007-03-21 06:06:09
|
On Mon, 19 Mar 2007, Withers John Z wrote: > 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. If you have both Java and Perl programs and you want them to share a common log4perl/j configuration, that's definitely the way to go. In this case, however, you need to add Log::Dispatch from CPAN. -- Mike Mike Schilli m...@pe... > > John > > John Withers > > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...] > 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 = 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: > > > 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... > |