I am getting this message consistently.

(in cleanup) Can't call method "log" on an undefined value at
/usr/lib/perl5/site_perl/5.8/Log/Log4perl/Appender.pm line 189 during global
destruction.


I have a series of modules that are descendants of other packages.
Scripts using the objects are using log4perl, and the packages also use
log4perl.

Everything seems to work - I initiate the logger in the 'script' that uses
the libraries,
and when the script ends, it calls a library function (i.e. pass, fail,
error).

These methods call the exit function, which in turn invoke the DESTROY
routine for each object.
It seems as though Log4perl is being destroyed prior to other objects being
cleaned up (which use the logger in their DESTROY routines)
or so I think.

Can anyone help me try to figure out how to stop this, and ensure all
logging occurs right to the end of the script.

Any help would be appreciated.

I instantiated the logger with a simple screen appender.

my $conf = qq |
    log4perl.logger                      = $acceptedLevel, ScreenApp
    log4perl.appender.ScreenApp          = Log::Log4perl::Appender::Screen
    log4perl.appender.ScreenApp.stderr   = 0
    log4perl.appender.ScreenApp.layout   = PatternLayout
    log4perl.appender.ScreenApp.layout.ConversionPattern = %d %-5p %-4L %m%n
    |;

But I always get :
(in cleanup) Can't call method "log" on an undefined value at
/usr/lib/perl5/site_perl/5.8/Log/Log4perl/Appender.pm line 189 during global
destruction.

at the end of the script.

Somethings I am missing log statements as well.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to