I can't seem to get Log::Log4perl to work with
Log::Dispatch::Email::MailSendmail even though using
Log::Dispatch::Email::MailSendmail on the command line works fine. Also,
there are 2 appenders assigned to the category (one file, one email) and
the file seems to get the messages fine. Any ideas?
This works :
perl -MLog::Dispatch::Email::MailSendmail -e '$e =
Log::Dispatch::Email::MailSendmail->new( to=>
q(sto...@tu...), from=> q(te...@te...), name=>
q(test), min_level=> q(debug) ); $e->log( message=> q(testttttt), level=>
q(error) );'
This configuration only logs to the file appender (logging involked using
error method):
log4perl.logger.mapping = ERROR, Errormapping, Tnotify
log4perl.additivity.mapping = 0
log4perl.appender.Tnotify = Log::Dispatch::Email::MailSendmail
log4perl.appender.Tnotify.name = tnotify
log4perl.appender.Tnotify.min_level = debug
log4perl.appender.Tnotify.from = te...@te...
log4perl.appender.Tnotify.to = sto...@tu...
log4perl.appender.Tnotify.layout = Log::Log4perl::Layout::SimpleLayout
log4perl.appender.Errormapping = Log::Log4perl::Appender::File
log4perl.appender.Errormapping.mode = clobber
log4perl.appender.Errormapping.autoflush = 1
log4perl.appender.Errormapping.filename = ./error_mapping.txt
log4perl.appender.Errormapping.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Errormapping.layout.ConversionPattern = %m%n%n
Stathy G. Touloumis
Lead Programmer, Benchmarks
Edison Schools, Inc.
Ph: 847.676.6663
|