You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Johann Uhrmann <jo...@xpecto.com> on 2003/05/19 13:15:39 UTC
Simple implementations of org.apache.log4j.spi.TriggeringEventEvaluator
Hello,
I wonder whether it would be a good idea to provide some simple
implementations of the interface
org.apache.log4j.spi.TriggeringEventEvaluator with the Log4j distribution.
Here are two examples, I use for the SMTPAppender:
public class IsError implements TriggeringEventEvaluator
{
public boolean isTriggeringEvent(LoggingEvent event)
{
return event.getLevel().isGreaterOrEqual(Level.ERROR);
}
}
---------------------------------------
public class IsFatal implements TriggeringEventEvaluator
{
public boolean isTriggeringEvent(LoggingEvent event)
{
return event.getLevel().isGreaterOrEqual(Level.FATAL);
}
}
Of course, these are two simple classes but I guess they might be
useful. If You decide to include these classes into the distribution,
I'd be happy to add some documentation.
Kind regards,
Johann Uhrmann
--
Johann Uhrmann
xpecto AG | Lindenstrasse 81 | D-84030 Ergolding
Telefon: 0700 xpecto 00 (0700 973286 00)
Telefax: 0700 xpecto 10 (0700 973286 10)
Internet: http://www.xpecto.com
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org