Package org.frankframework.logging
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.ResultNested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
org.apache.logging.log4j.core.LifeCycle.State -
Field Summary
FieldsFields inherited from class org.apache.logging.log4j.core.filter.AbstractFilter
onMatch, onMismatchFields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERFields inherited from interface org.apache.logging.log4j.core.Filter
ELEMENT_TYPE, EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionstatic IbisThreadFiltercreateFilter(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.Resultfilter(org.apache.logging.log4j.core.LogEvent event) voidsetlevel(org.apache.logging.log4j.Level level) voidSets 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, toStringMethods 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, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.Filter
filterMethods inherited from interface org.apache.logging.log4j.core.LifeCycle
getState, initialize, isStarted, isStopped, start, stop
-
Field Details
-
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:
filterin interfaceorg.apache.logging.log4j.core.Filter- Overrides:
filterin classorg.apache.logging.log4j.core.filter.AbstractFilter
-
setRegex
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)
-