Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

[Log4perl] adding actions to messages

by menth0l (Monk)
on Aug 19, 2011 at 09:38 UTC ( [id://921199]=perlquestion: print w/replies, xml ) Need Help??

menth0l has asked for the wisdom of the Perl Monks concerning the following question:

Is there an option in Log4perl to add action(s) to messages at certain level? For example i I'd like to shutdown whole application (I mean clean shutdown: stopping all threads, closing handles etc.) when error of type FATAL occurs. Does L4p exposes an interface of that kind or do I have to do some hacking?

Replies are listed 'Best First'.
Re: [Log4perl] adding actions to messages
by Perlbotics (Archbishop) on Aug 19, 2011 at 10:10 UTC
Re: [Log4perl] adding actions to messages
by moritz (Cardinal) on Aug 19, 2011 at 09:58 UTC
    In my humble opinion, it's not the task of the logging framework to do a shutdown. You should rather have an error handler inside your application which does that, and the error handler can in turn call some logging routines.
Re: [Log4perl] adding actions to messages
by Anonymous Monk on Aug 19, 2011 at 09:42 UTC

    Does L4p exposes an interface of that kind or do I have to do some hacking?

    Seeing how you can write your own buffers, formatters, filters .... yes, l4p does expose an interface

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://921199]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-23 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found