Subject: | Log::Log4perl::Logger |
Date: | Mon, 28 Jan 2008 17:50:00 +0100 |
To: | bug-Log-Log4perl [...] rt.cpan.org |
From: | Felix Antonius Wilhelm Ostmann <ostmann [...] websuche.de> |
Log::Log4perl::Logger: 1.14
perl: v5.8.8
uname: Linux www1 2.6.17-2-686 #1 SMP Wed Sep 13 16:34:10 UTC 2006 i686
GNU/Linux
the increase and decrease of the caller_depth is missing in the sub
error_warn. that produce wrong msg.
in error_die it works well :)
##################################################
sub error_warn {
##################################################
my $self = shift;
if ($self->is_error()) {
$self->error(@_);
$self->and_warn(@_);
}
}
##################################################
sub error_die {
##################################################
my $self = shift;
my $msg = $self->warning_render(@_);
if ($self->is_error()) {
$Log::Log4perl::caller_depth++;
$self->error($msg);
$Log::Log4perl::caller_depth--;
}
$Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR ?
$self->and_die($msg) :
exit($Log::Log4perl::LOGEXIT_CODE);
}
MfG
Felix Antonius Wilhelm Ostmann