From: Johannes K. <jo....@gm...> - 2007-12-04 06:46:34
|
Hi, Mike Schilli schrieb: > On Fri, 23 Nov 2007, Johannes Kilian wrote: > >> Using my "traditional" log4perl configuration file (used from 0.51 >> on) the 1.12 Version shows following behaviour (which I didn't >> notice with earlier versions ...): >> 1.) Initializing log4perl works without any errors >> 2.) Getting loggers works without any errors >> 3.) Using $logger->logdie(...) (and other functions dieing, like $logger->error_die(...)) makes the program die IMMEDIATELY; I'm not able to catch the die-exception within an eval{} block -> WHY??? - I'm sure it worked with earlier versions of log4perl .. > > Hmm, the following works for me: > > use Log::Log4perl qw(:easy); > Log::Log4perl->easy_init($DEBUG); > > eval { > LOGDIE "Waah!"; > }; > > print "Survived!\n"; > > and prints > > 2007/11/30 17:38:48 Waah! > Survived! > > Do you have a __DIE__ handler defined somewhere by any chance? > No - no __DIE__ handler within my own perl-modules/perl files. Perhaps there might be some troublesome __DIE__ handler within the officiall perl modules (installed in Perl\lib or Perl\site\lib) - But how can I find out which one is it? > >> 4.) Finishing my program an error from log4perl occurs: (in cleanup) Internal error: Root Logger not initialized. at C:/Programme/Perl/site/lib/Log/Log4perl/Logger.pm line 557 during global destruction. >> How can I avoid the internal error above? Perhaps the uninitialized root logger causes the erroneous exception handling as described in point 3.)? Thanks Johannes |