Skip Menu |

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

Report information
The Basics
Id: 56944
Status: open
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: anthony [...] derobert.net
JACOB [...] cpan.org
Cc:
AdminCc:

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



Subject: $Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR inconsistencies
logcluck() ignores $Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR but logcarp() honers it. Both methods should behave the same, preferably by honering a new $Log::Log4perl::LOGWARN_MESSAGE_ON_STDERR flag. BTW: Is it on purpose or an oversight that all those methods do not increase $Carp::CarpLevel by $Log::Log4perl::caller_depth?
Also, LOGDIE_MESSAGE_ON_STDERR changes the semantics of all functions that honor it: If it is set, they die(), if not they exit(). Not nice if someone wants to eval{} you... Maybe it'd be easiest to deprecate them all and add some clean interface to attach a stacktrace to a log message.
Calling exit() instead of die() is unexpected, since this documentation says: Often, when you croak / carp / warn / die, you want to log those messages. Rather than doing the following: $logger->fatal($err) && die($err); you can use the following: $logger->logdie($err); ... which turns out to have very different behavior when $Log::Log4perl::LOGDIE_MESSAGE_ON_STDERR = 0 (which appears to be the default).