|
From: Kevin G. <ke...@go...> - 2003-02-27 16:16:54
|
msc...@ao... wrote:
> In a message dated 2/26/2003 7:24:28 PM Eastern Standard Time, Kevin
> Goess <ke...@go...> writes:
>
>> but there is another problem in Log4perl. Log::Dispatch expects
>> the 'level' param to be a word, we are passing an integer, which
>> suggests that the hash %Log::Log4perl::Levels::L4P_TO_LD should
>> have values that 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 0 and
> emergency is 7)."
>
> Is the Apache logger different? If yes, we can certainly add the
> change as you suggested, patch is attached.
Well, you're right, the Log::Dispatch docs do say that. But the guts of
ApacheLog.pm are doing stuff like this
elsif( $p{level} eq 'warning' )
{
$method = 'warn';
}
else
{
$method = $p{level};
}
$self->{apache_log}->$method( $p{message} );
which is where it fails trying to call $log->7() if you pass it a number.
Mike, are there any negative ramifications to changing it from a number
to a string? Is there anything else that expects it to be a number?
Dave, is this a deficiency in ApacheLog.pm, or are we misunderstanding
something?
--
Happy Trails . . .
Kevin M. Goess
(and Anne and Frank)
904 Carmel Ave.
Albany, CA 94706
(510) 525-5217
|