From: Mike S. <m...@pe...> - 2002-11-07 09:57:29
|
Hi there, here's a patch to review for the problem of Log4perl passing along messages to the Log::Dispatch appenders with priority DEBUG only. What I did was define a mapping between Log4perl priorities/levels and Log::Dispatch's, put it into a hash (%L4P_TO_LD) in Log::Log4perl::Levels and extend the level-generating function with one additional parameter, which is the equivalent Log::Dispatch priority of the Log4perl priority to be defined. This way, all Log::Dispatch appenders are initialized with min_level=debug (no change), but the loggers will figure out at runtime (hash-lookup) what Log::Dispatch priority corresponds to the current message's level and pass that on the Log::Dispatch logger when it comes down to actually logging the message. I've defined a test case also, but it doesn't show up yet, because I haven't checked in the file yet. It's getting kind of late, so let me submit this to the list before I check it in, just to make sure I haven't overlooked anything stupid :) -- Mike -------------------------------------------------------- Mike Schilli log...@pe... http://perlmeister.com -------------------------------------------------------- |