From: <Sag...@ub...> - 2003-02-27 13:39:16
|
Kevin/Mike, Thanks very much for your help, at least I now know I wasn't doing = anything silly. I look forward to these fixes in a future Log4perl release. In the = meantime I'm going to implement my own subclass of = Log::Dispatch::ApacheLog with a) hard code the numbers temporarily (unfortunately I can't just patch = the Log4perl, large organisations like mine have lots of rules) b) replace the need for the $r apache argument. I really don't see why Log::Dispatch::ApacheLog requires the user to = pass it an Apache::Request or Apache::Server object since it could = simply do: use Apache; use Apache::Log; if($r and not $r->isa('Apache::Server') and not $r->('Apache::Request')) = { $r =3D Apache->request->server; } I guess one for me to ponder for a bit longer/ push to the Log::Dispatch = author/team. Thanks again for your help and for producing log4perl in the first = place! Best Regards Sagar >-----Original Message----- >From: msc...@ao... [mailto:msc...@ao...] >Sent: 27 February 2003 08:24 >To: ke...@go...; Shah, Sagar >Cc: log...@li... >Subject: Re: [log4perl-devel] Log4perl / Log::Dispatch::ApacheLog >problem > > >In a message dated 2/26/2003 7:24:28 PM Eastern Standard Time,=20 >Kevin Goess <ke...@go...> writes: > >>Sagar, it looks like log4perl is taking the values from your=20 >config hash=20 >>and converting them into text strings: > >Aha! Thanks for the great detective work!=20 > >>but there is another problem in Log4perl. Log::Dispatch expects the=20 >>'level' param to be a word, we are passing an integer, which suggests=20 >>that the hash %Log::Log4perl::Levels::L4P_TO_LD should have=20 >values that=20 >>are words not integers, and that this stuff in Levels.pm > >Hmm. The Log::Dispatch man page seems to say integers are okay: > > "Alternately, the numbers 0 through 7 may be used (debug is=20 >0 and emergency is 7)." > >Is the Apache logger different? If yes, we can certainly add=20 >the change as you suggested, patch is attached.=20 > >--=20 >-- Mike > >############################ ># Mike Schilli # ># log...@pe... # ># http://perlmeister.com # ># log4perl.sourceforge.net # >############################ > +ANYTHING+BELOW+THIS+LINE+WAS+ADDED+AFTER+I+HIT+SEND+ Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |