In a message dated 1/3/2003 7:28:17 PM Eastern Standard Time, Peter Scott <Pe...@PS...> writes:
>I have an application which uses $SIG{__DIE__} to catch exceptions and
>route them to appenders. I often find I get a stack of messages which
>contains:
I've got two things for you to try:
(1) Here's a new test version of Log::Log4perl, which will print "[undef]" if any expected return value of caller() is not defined, instead of the warning you're getting:
http://log4perl.sourceforge.net/Log-Log4perl-0.28dev2.tar.gz
(2) The fact that you're getting undefined values seems to indicate that your Log::Log4perl::caller_depth variable is off. Did you modify it? If not, I would really like to track this down. Can you provide a short code sample with a signal handler and a function that reproduces the problem? Also, please make sure to read the FAQ dealing with a similar issue:
http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#how_can_i_make_sure_my_application_logs_a_message_when_it_dies_unexpectedly
Towards the end, it shows how to offset Log::Log4perl's caller stack to get the right subroutines/lines numbers in the pattern layout.
Thanks for your help!
--
-- Mike
############################
# Mike Schilli #
# log...@pe... #
# http://perlmeister.com #
# log4perl.sourceforge.net #
############################
|