You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Decker, Pascal" <pa...@entory.com> on 2002/09/04 10:30:55 UTC

Problem sending only one line using SMTPAppender

Hi,

1. I use a FileAppender to log to a file and a SMTPAppender to send fatal
errors in an email.
To filter, that only fatal errors will be sent in an email I wrote a custom
class that implements TriggeringEventEvaluator.
and I define the class in log4j.properties
log4j.appender.mail.EvaluatorClass=com.SomeClass

Everything works perfect, but If any debug log entries have already been
logged to the FileAppender and after that a fatal error occurs, I receive an
email with everything in it:Debug, Info and Error log entries.
I only expect to get one log entry if a fatal error occurs.

Is there any buffering mechanism, that adds all log entries in the email?

2. Is there a similar filtering mechanism for FileAppender like implementing
TriggeringEventEvaluator in the case of SMTPAppender?

Any help is very welcome!
cheers,

Pascal