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 Mark Balster <ma...@expressdata.net> on 2001/01/11 22:03:27 UTC

org.apache.log4j.spi.TriggeringEventEvaluator

I am trying to make use of the TriggeringEventEvaluator interface.

Unfortunately, I have not been very successful.

Re: org.apache.log4j.spi.TriggeringEventEvaluator

Posted by Ceki Gulcu <cg...@urbanet.ch>.
It's a bug! Just corrected it. New release in a few minutes! Ceki

At 16:03 11.01.2001 -0500, you wrote:
>I am trying to make use of the TriggeringEventEvaluator interface.
>
>Unfortunately, I have not been very successful.
>
> From my properties file:
>
>....
>log4j.appender.A3.EvaluatorClass=com.expressdata.log4j.SMTPEvaluator
>log4j.appender.A3.BufferSize=1
>....
>
>and the class
>
>import org.apache.log4j.Priority;
>
>public class SMTPEvaluator extends java.lang.Object implements 
>org.apache.log4j.spi.TriggeringEventEvaluator {
>
>     /** Creates new SMTPEvaluator */
>     public SMTPEvaluator() {
>     }
>
>     public boolean isTriggeringEvent(final 
> org.apache.log4j.spi.LoggingEvent loggingEvent) {
>         // In this specific example, we want to return all
>         return loggingEvent.priority.isGreaterOrEqual(Priority.DEBUG);
>     }
>
>}
>
>It appears that the class is never being created and therefore never 
>used.  Is this a know bug or do I have something wrong.
>
>Any assistance is very much appreciated!
>
>