@Plugin(name="StructuredDataFilter", category="Core", elementType="filter", printObject=true) public final class StructuredDataFilter extends MapFilter
AbstractFilter.AbstractFilterBuilder<B extends AbstractFilter.AbstractFilterBuilder<B>>
Filter.Result
LifeCycle.State
onMatch, onMismatch
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
ELEMENT_TYPE
Modifier and Type | Method and Description |
---|---|
static StructuredDataFilter |
createFilter(KeyValuePair[] pairs,
String oper,
Filter.Result match,
Filter.Result mismatch)
Creates the StructuredDataFilter.
|
Filter.Result |
filter(LogEvent event)
Context Filter method.
|
Filter.Result |
filter(Logger logger,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
org.apache.logging.log4j.message.Message msg,
Throwable t)
Appender Filter method.
|
protected Filter.Result |
filter(org.apache.logging.log4j.message.StructuredDataMessage message) |
filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, getMap, getStringMap, isAnd, toString
equalsImpl, filter, filter, getOnMatch, getOnMismatch, hashCodeImpl
getState, getStatusLogger, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, stop, stop
public Filter.Result filter(Logger logger, org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, org.apache.logging.log4j.message.Message msg, Throwable t)
AbstractFilter
public Filter.Result filter(LogEvent event)
AbstractFilter
protected Filter.Result filter(org.apache.logging.log4j.message.StructuredDataMessage message)
@PluginFactory public static StructuredDataFilter createFilter(@PluginElement(value="Pairs") KeyValuePair[] pairs, @PluginAttribute(value="operator") String oper, @PluginAttribute(value="onMatch") Filter.Result match, @PluginAttribute(value="onMismatch") Filter.Result mismatch)
pairs
- Key and value pairs.oper
- The operator to perform. If not "or" the operation will be an "and".match
- The action to perform on a match.mismatch
- The action to perform on a mismatch.Copyright © 1999-2021 The 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.