Package net.shibboleth.idp.logging
Class LogbackEvaluator
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.boolex.EventEvaluatorBase<ch.qos.logback.classic.spi.ILoggingEvent>
net.shibboleth.idp.logging.LogbackEvaluator
- All Implemented Interfaces:
ch.qos.logback.core.boolex.EventEvaluator<ch.qos.logback.classic.spi.ILoggingEvent>,ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle
public class LogbackEvaluator
extends ch.qos.logback.core.boolex.EventEvaluatorBase<ch.qos.logback.classic.spi.ILoggingEvent>
Port of contributed logback Evaluator for log filtering replacing the
Janino-based feature removed from logback for "reasons".
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PatternFilter against logger name/category.private PatternFilter against message.Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(ch.qos.logback.classic.spi.ILoggingEvent event) voidsetLoggerPattern(String pattern) Sets the regular expression pattern to match against the logging name/category.voidsetMessagePattern(String pattern) Sets the regular expression pattern to match against the logging message.Methods inherited from class ch.qos.logback.core.boolex.EventEvaluatorBase
getName, isStarted, setName, start, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
loggerPattern
Filter against logger name/category. -
messagePattern
Filter against message.
-
-
Constructor Details
-
LogbackEvaluator
public LogbackEvaluator()
-
-
Method Details
-
setLoggerPattern
Sets the regular expression pattern to match against the logging name/category.- Parameters:
pattern- pattern string to compile
-
setMessagePattern
Sets the regular expression pattern to match against the logging message.- Parameters:
pattern- pattern string to compile
-
evaluate
public boolean evaluate(ch.qos.logback.classic.spi.ILoggingEvent event) throws NullPointerException, ch.qos.logback.core.boolex.EvaluationException - Throws:
NullPointerExceptionch.qos.logback.core.boolex.EvaluationException
-