org.jboss.logging.appender
Class RegexEventEvaluator

java.lang.Object
  extended byorg.jboss.logging.appender.RegexEventEvaluator

public class RegexEventEvaluator
extends java.lang.Object

An implementation of the log4j TriggeringEventEvaluator that matches the LoggingEvent message against the MDB{RegexEventEvaluator} regular expression.


Constructor Summary
RegexEventEvaluator()
           
 
Method Summary
 boolean isTriggeringEvent(LoggingEvent event)
          Lookup the current MDC 'RegexEventEvaluator' to determine the regular expression context that should be applied to determine if the logging event should be considered a triggering event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexEventEvaluator

public RegexEventEvaluator()
Method Detail

isTriggeringEvent

public boolean isTriggeringEvent(LoggingEvent event)
Lookup the current MDC 'RegexEventEvaluator' to determine the regular expression context that should be applied to determine if the logging event should be considered a triggering event. If there is no value for the 'RegexEventEvaluator' key then no comparision is made.

Parameters:
event - the logging event to check
Returns:
true if MDC{RegexEventEvaluator} is a regex expression that matches the event.getRenderedMessage(), false otherwise.