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

    Fields
    Modifier and Type
    Field
    Description
    private Pattern
    Filter against logger name/category.
    private Pattern
    Filter against message.

    Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    evaluate(ch.qos.logback.classic.spi.ILoggingEvent event)
    void
    Sets the regular expression pattern to match against the logging name/category.
    void
    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, stop

    Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ch.qos.logback.core.spi.ContextAware

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
  • Field Details

    • loggerPattern

      @Nullable private Pattern loggerPattern
      Filter against logger name/category.
    • messagePattern

      @Nullable private Pattern messagePattern
      Filter against message.
  • Constructor Details

    • LogbackEvaluator

      public LogbackEvaluator()
  • Method Details

    • setLoggerPattern

      public void setLoggerPattern(@Nonnull String pattern)
      Sets the regular expression pattern to match against the logging name/category.
      Parameters:
      pattern - pattern string to compile
    • setMessagePattern

      public void setMessagePattern(@Nonnull String pattern)
      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:
      NullPointerException
      ch.qos.logback.core.boolex.EvaluationException