From: Mike S. <log...@pe...> - 2003-07-16 09:21:45
|
On Wed, 16 Jul 2003, Johannes Kilian wrote: > How do I create appenders with different log levels? Within an > automated process instensive logging should be performed - in > errorcase (LogLevel $ERROR, $FATAL) an email should be sent to the > administrator. I plan to use as an appender Log::Dispatch::Email. Here's an FAQ on how to set up the log levels/thresholds correctly according to your requirements, just replace "Log::Dispatch::File" by "Log::Dispatch::Email": http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#how_can_i_collect_all_fatal_messages_in_an_extra_log_file Here's one on how to set up an email appender: http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#how_can_i_configure_log__log4perl_to_send_me_email_if_something_happens And finally, since I seem to have picked up a German accent ;), here's an article on how to use Log4perl, which also deals with setting up appenders sending Email: http://www.linux-magazin.de/Artikel/ausgabe/2003/01/perl/perl.html Hope that helps! -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |