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

Reply via email to