Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 14519
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: MSCHILLI [...] cpan.org
Requestors: thomas [...] tgminc.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.00
Fixed in: (no value)



Subject: Log4Perl
Log4Perl 1.00 Perl, v5.6.1 built for i386-linux Linux hostname 2.4.20-37.7.legacysmp Warning/Info message on console ------------------------------------ Log4perl: Seems like no initialization happened. Forgot to call init()? Implementation ------------------------------------ main: use Log::Log4perl; Log::Log4perl->init("log.conf"); Modules: use Log::Log4perl; ... $logger = Log::Log4perl->get_logger("Pkg::SubPkg"); ... ------------------------------------ I have tried various settings, init approaches but no such luck. I continue to get this message. Tom
[guest - Thu Sep 8 15:01:02 2005]: Show quoted text
>> main:
> use Log::Log4perl; > Log::Log4perl->init("log.conf"); > Modules: > use Log::Log4perl; > ... > $logger = Log::Log4perl->get_logger("Pkg::SubPkg"); > ... > ------------------------------------ > I have tried various settings, init approaches but no such luck. I > continue to get this message.
I don't see a warning. Can you verify your code looks something like this: package SomeModule; use Log::Log4perl; sub foo { my $logger = Log::Log4perl->get_logger("Pkg::SubPkg"); } package main; use Log::Log4perl; Log::Log4perl->init("log.conf"); SomeModule::foo();
[MSCHILLI - Fri Sep 9 04:01:12 2005]: Show quoted text
> [guest - Thu Sep 8 15:01:02 2005]: >
> >> main:
> > use Log::Log4perl; > > Log::Log4perl->init("log.conf"); > > Modules: > > use Log::Log4perl; > > ... > > $logger = Log::Log4perl->get_logger("Pkg::SubPkg"); > > ... > > ------------------------------------ > > I have tried various settings, init approaches but no such luck. I > > continue to get this message.
> > I don't see a warning. Can you verify your code looks something like > this: > > package SomeModule; > use Log::Log4perl; > sub foo { > my $logger = Log::Log4perl->get_logger("Pkg::SubPkg"); > } > > package main; > > use Log::Log4perl; > Log::Log4perl->init("log.conf"); > SomeModule::foo();
Verified - once gain though for posterity... ---------- #!/usr/bin/perl -w package main; use Log::Log4perl; Log::Log4perl->init("log.conf"); ... --------- package Database::DML; use DB_File; use Fcntl qw(:flock O_RDWR); use Database::Lock; use Log::Log4perl; # # other declarations ... # sub DML { my $self = bless {}; $logger = Log::Log4perl->get_logger("Database::DML"); $logger->debug("Database::DML()"); $locker = Database::Lock->Lock(); return $self; } ... ------- All other modules follow the same format. I tried copying Log::Log4perl->get_logger() from the module constructor/new subroutine into the very first subroutine actually executed - no change. I also tried re-ordering the 'use' statmements w/Log4Perl first - nothing. This message does not appear when running in the debugger. Everything runs fine and logging works as expected however... after repeating several times I "noticed" that it is "always" the last line written to stdout/err after all other program output has been flushed. I could be wrong but it seems as though it's some sort of finialization scenario. Tom
[guest - Fri Sep 9 09:48:04 2005]: Show quoted text
> All other modules follow the same format.
Can you provide a fully functional snippet of code that reproduces the error? Show quoted text
> This message does not appear when running in the debugger.
Are you using multiple processes or threads? --Mike
On Sun Sep 11 13:29:51 2005, MSCHILLI wrote: Show quoted text
> Can you provide a fully functional snippet of code that reproduces the > error?
Haven't heard back, closing bug.