Class IbisThreadFilter

java.lang.Object
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilter
org.frankframework.logging.IbisThreadFilter
All Implemented Interfaces:
org.apache.logging.log4j.core.Filter, org.apache.logging.log4j.core.LifeCycle, org.apache.logging.log4j.core.LifeCycle2

@Plugin(name="IbisThreadFilter", category="Core", elementType="filter", printObject=true) public class IbisThreadFilter extends org.apache.logging.log4j.core.filter.AbstractFilter
Extension of StringMatchFilter with the facility of executing a regular expression on the name of the current thread.
Author:
Peter Leeuwenburgh, Murat Kaan Meral
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.logging.log4j.core.filter.AbstractFilter

    org.apache.logging.log4j.core.filter.AbstractFilter.AbstractFilterBuilder<B extends org.apache.logging.log4j.core.filter.AbstractFilter.AbstractFilterBuilder<B>>

    Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.Filter

    org.apache.logging.log4j.core.Filter.Result

    Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle

    org.apache.logging.log4j.core.LifeCycle.State
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.logging.log4j.Level
     
    protected Pattern
     

    Fields inherited from class org.apache.logging.log4j.core.filter.AbstractFilter

    onMatch, onMismatch

    Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle

    DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER

    Fields inherited from interface org.apache.logging.log4j.core.Filter

    ELEMENT_TYPE, EMPTY_ARRAY
  • Method Summary

    Modifier and Type
    Method
    Description
    createFilter(String regex, org.apache.logging.log4j.Level level, org.apache.logging.log4j.core.Filter.Result onMatch, org.apache.logging.log4j.core.Filter.Result onMismatch)
     
    org.apache.logging.log4j.core.Filter.Result
    filter(org.apache.logging.log4j.core.LogEvent event)
     
    void
    setlevel(org.apache.logging.log4j.Level level)
     
    void
    Sets the pattern to match.

    Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilter

    equalsImpl, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, getOnMatch, getOnMismatch, hashCodeImpl, toString

    Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle

    getState, getStatusLogger, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, stop, stop

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.logging.log4j.core.Filter

    filter

    Methods inherited from interface org.apache.logging.log4j.core.LifeCycle

    getState, initialize, isStarted, isStopped, start, stop
  • Field Details

    • regex

      protected Pattern regex
    • level

      protected org.apache.logging.log4j.Level level
  • Method Details

    • filter

      public org.apache.logging.log4j.core.Filter.Result filter(org.apache.logging.log4j.core.LogEvent event)
      Specified by:
      filter in interface org.apache.logging.log4j.core.Filter
      Overrides:
      filter in class org.apache.logging.log4j.core.filter.AbstractFilter
    • setRegex

      public void setRegex(String regex)
      Sets the pattern to match. If no pattern is given or pattern is empty, then it will match nothing.
      Parameters:
      regex - Regular expression to match.
    • setlevel

      public void setlevel(org.apache.logging.log4j.Level level)
    • createFilter

      @PluginFactory public static IbisThreadFilter createFilter(@PluginAttribute("regex") String regex, @PluginAttribute(value="level",defaultString="WARN") org.apache.logging.log4j.Level level, @PluginAttribute(value="onMatch",defaultString="DENY") org.apache.logging.log4j.core.Filter.Result onMatch, @PluginAttribute(value="onMismatch",defaultString="NEUTRAL") org.apache.logging.log4j.core.Filter.Result onMismatch)