Mike Schilli wrote:
> On Tue, 21 Aug 2007, Robert Hicks wrote:
>
>> sub get_logger { my $class = shift; my $module_name = shift;
>>
>> unless( Log::Log4perl->initialized ) {
>>
>> # watch the config file for changes (in seconds)
>> Log::Log4perl->init_and_watch( "log4perl.conf", 60 );
>> $Log::Log4perl::caller_depth = 1;
>> }
>>
>> return Log::Log4perl->get_logger( $module_name );
>> }
>
> You're increasing the caller_depth, although you're calling the log
> method in the main program, not in the wrapper. Kick out that line and
> you'll be ok.
>
Ah! I was just reading up on caller_depth and that part was confusing me.
Robert
|