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 James Noble <Ja...@herndon-lab.com> on 2004/01/21 19:43:39 UTC
SMTPAppender EvaluatorClass Option
Has anyone successfully used the SMTPAppender EvaluatorClass option? When I
try to use my own evaluator class I get these error messages:
log4j:ERROR Could not instantiate class [my.package.TriggerOnWarn].
java.lang.ClassNotFoundException: my.package.TriggerOnWarn
[stack trace...]
TriggerOnWarn is implemented as follows:
package my.package;
import org.apache.log4j.Level;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.TriggeringEventEvaluator;
public class TriggerOnWarn implements TriggeringEventEvaluator {
public boolean isTriggeringEvent( LoggingEvent event ) {
return event.getLevel().isGreaterOrEqual( Level.WARN );
}
}
Besides implementing the TriggeringEventEvaluator interface, does the
evaluator class have to be a subclass of a particular class or in the
org.apache.log4j package?
Thanks!
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org