Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Log::Log4perl syslog wall best practice

by polettix (Vicar)
on Mar 20, 2012 at 07:36 UTC ( #960543=note: print w/ replies, xml ) Need Help??


in reply to Log::Log4perl syslog wall best practice

After having looked at the explanation in the RT thread, I'd say that you can go for this small function:

sub ERRORDIE { Log::Log4perl->get_logger->error_die(@_); }
Put that in a module, use where applicable and you should be set without much complaining from cow-orkers.

The fact is that you're trying to use the same hammer for very different nails, so you either need a different hammer (e.g. ERRORDIE above) or substitute the hammer on the fly (e.g. redefine LOGDIE/LOGCROAK/LOGEXIT). Personally, I'd leave LOGDIE its advertised semantic - i.e. raise a FATAL log message and exit with an error - and use a different function (e.g. ERRORDIE above) to do similar but different things.

perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Io ho capito... ma tu che hai detto?


Comment on Re: Log::Log4perl syslog wall best practice
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://960543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (17)
As of 2014-07-22 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (109 votes), past polls