Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: joerg.meltzer [...] tngtech.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: make $logger->error_die available in :easy mode or tune down LOGDIE/CROAK/EXIT to ERROR
I am using Log::Log4perl with a Syslog appender in :easy mode. Currently I am flooded with Syslog messages whenever I LOGDIE LOGCROAK LOGEXIT in a script, as all of them log on FATAL severity. It would be nice to either tune the Loglevel down to ERROR or provide an ERRORDIE subroutine.
Show quoted text
> Currently I am flooded with Syslog messages whenever I LOGDIE LOGCROAK > LOGEXIT in a script, as all of them log on FATAL severity.
Throwing LOGDIE and exiting an application because it makes no sense to keep it running is a pretty severe condition, though, which I would expect to be reflected in a FATAL message in syslog. I'm no expert in syslog levels, so help me out here: Isn't FATAL exactly the definition of an application unable to continue because of a severe condition?
From: joerg.meltzer [...] tngtech.com
Am Fr 16. Mär 2012, 03:21:09, MSCHILLI schrieb: Show quoted text
> > Currently I am flooded with Syslog messages whenever I LOGDIE LOGCROAK > > LOGEXIT in a script, as all of them log on FATAL severity.
> > Throwing LOGDIE and exiting an application because it makes no sense to > keep it running is a pretty severe condition, though, which I would > expect to be reflected in a FATAL message in syslog. > > I'm no expert in syslog levels, so help me out here: Isn't FATAL exactly > the definition of an application unable to continue because of a severe > condition?
I think FATAL is a reasonable default for LOGDIE, however to me the severity of a die isn't always the same. It makes a difference, whether I run a mission critical daemon (then it should be FATAL) or just a bunch of interactive scripts. To give my case a bit of context. I want to provision virtual machines, which is interactive, but I also want it to be logged so logging data can be used for monitoring. I want to have a monitoring tool decide what is fatal.
On Fri Mar 16 04:24:53 2012, codeacrobat wrote: Show quoted text
> It makes a difference, whether I run a mission critical daemon (then it > should be FATAL) or just a bunch of interactive scripts.
Hmm, not sure if this is an generally applicable law, but how about you use Log::Log4perl->get_logger->error_die("Whoa!"); in these cases?
From: joerg.meltzer [...] tngtech.com
Am Di 20. Mär 2012, 02:12:21, MSCHILLI schrieb: Show quoted text
> Hmm, not sure if this is an generally applicable law, but how about
you use Show quoted text
> > Log::Log4perl->get_logger->error_die("Whoa!"); > > in these cases?
That would totally defeat the easy mode we are using so far. It is hard enough to convince some colleagues to use a perl script rather then logging something with /bin/echo in some clunky shell script. The clean code pope solution probably would involve setting exceptions to the send "wall" notifications on emerg level in the syslog configuration and using a complicated Syslog appender script config. If this is even possible, it is not something you find easily in the manual. (If you do please put it in the FAQ.) Therefore I suggest to have an ERRORDIE in easy mode.
From: joerg.meltzer [...] tngtech.com
FYI, there is a SOPW question at perlmonks.org on this issue. http://perlmonks.org/?node_id=960540 Regards, codeacrobat Am Di 20. Mär 2012, 02:53:09, codeacrobat schrieb: Show quoted text
> Am Di 20. Mär 2012, 02:12:21, MSCHILLI schrieb:
> > Hmm, not sure if this is an generally applicable law, but how about
> you use
> > > > Log::Log4perl->get_logger->error_die("Whoa!"); > > > > in these cases?
> > That would totally defeat the easy mode we are using so far. > It is hard enough to convince some colleagues to use a perl script > rather then logging something with /bin/echo in some clunky shell script. > > > The clean code pope solution probably would involve setting exceptions > to the send "wall" notifications on emerg level in the syslog > configuration and using a complicated Syslog appender script config. > > If this is even possible, it is not something you find easily in the > manual. (If you do please put it in the FAQ.) > > Therefore I suggest to have an ERRORDIE in easy mode.