@Plugin(name="DynamicThresholdFilter", category="Core", elementType="filter", printObject=true) public final class DynamicThresholdFilter extends AbstractFilter
Filter.ResultLifeCycle.StateonMatch, onMismatchDEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERELEMENT_TYPE| Modifier and Type | Method and Description |
|---|---|
static DynamicThresholdFilter |
createFilter(String key,
KeyValuePair[] pairs,
Level defaultThreshold,
Filter.Result onMatch,
Filter.Result onMismatch)
Create the DynamicThresholdFilter.
|
boolean |
equals(Object obj) |
Filter.Result |
filter(LogEvent event)
Context Filter method.
|
Filter.Result |
filter(Logger logger,
Level level,
Marker marker,
Message msg,
Throwable t)
Appender Filter method.
|
Filter.Result |
filter(Logger logger,
Level level,
Marker marker,
Object msg,
Throwable t)
Appender Filter method.
|
Filter.Result |
filter(Logger logger,
Level level,
Marker marker,
String msg,
Object... params)
Appender Filter method.
|
String |
getKey() |
Map<String,Level> |
getLevelMap() |
int |
hashCode() |
String |
toString() |
equalsImpl, getOnMatch, getOnMismatch, hashCodeImplgetState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop@PluginFactory public static DynamicThresholdFilter createFilter(@PluginAttribute(value="key") String key, @PluginElement(value="Pairs") KeyValuePair[] pairs, @PluginAttribute(value="defaultThreshold") Level defaultThreshold, @PluginAttribute(value="onMatch") Filter.Result onMatch, @PluginAttribute(value="onMismatch") Filter.Result onMismatch)
key - The name of the key to compare.pairs - An array of value and Level pairs.defaultThreshold - The default Level.onMatch - The action to perform if a match occurs.onMismatch - The action to perform if no match occurs.public Filter.Result filter(LogEvent event)
AbstractFilterfilter in interface Filterfilter in class AbstractFilterevent - The LogEvent.public Filter.Result filter(Logger logger, Level level, Marker marker, Message msg, Throwable t)
AbstractFilterfilter in interface Filterfilter in class AbstractFilterlogger - the Logger.level - The logging Level.marker - The Marker, if any.msg - The message, if present.t - A throwable or null.public Filter.Result filter(Logger logger, Level level, Marker marker, Object msg, Throwable t)
AbstractFilterfilter in interface Filterfilter in class AbstractFilterlogger - the Logger.level - The logging Level.marker - The Marker, if any.msg - The message, if present.t - A throwable or null.public Filter.Result filter(Logger logger, Level level, Marker marker, String msg, Object... params)
AbstractFilterfilter in interface Filterfilter in class AbstractFilterlogger - the Logger.level - The logging Level.marker - The Marker, if any.msg - The message, if present.params - An array of parameters or null.public String getKey()
public String toString()
toString in class AbstractFilterCopyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.