public abstract class AbstractFilter extends AbstractLifeCycle implements Filter
Filter.ResultLifeCycle.State| Modifier and Type | Field and Description |
|---|---|
protected Filter.Result |
onMatch
The onMatch Result.
|
protected Filter.Result |
onMismatch
The onMismatch Result.
|
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERELEMENT_TYPE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFilter()
The default constructor.
|
protected |
AbstractFilter(Filter.Result onMatch,
Filter.Result onMismatch)
Constructor that allows the onMatch and onMismatch actions to be set.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
equalsImpl(Object obj) |
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.
|
Filter.Result |
filter(Logger logger,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
Object msg,
Throwable t)
Appender Filter method.
|
Filter.Result |
filter(Logger logger,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.Marker marker,
String msg,
Object... params)
Appender Filter method.
|
Filter.Result |
getOnMatch()
Returns the Result to be returned when a match occurs.
|
Filter.Result |
getOnMismatch()
Returns the Result to be returned when a match does not occur.
|
protected int |
hashCodeImpl() |
String |
toString() |
getState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stopprotected final Filter.Result onMatch
protected final Filter.Result onMismatch
protected AbstractFilter()
protected AbstractFilter(Filter.Result onMatch, Filter.Result onMismatch)
onMatch - The result to return when a match occurs.onMismatch - The result to return when a match dos not occur.protected boolean equalsImpl(Object obj)
equalsImpl in class AbstractLifeCyclepublic Filter.Result filter(LogEvent event)
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)
public Filter.Result filter(Logger logger, org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, Object msg, Throwable t)
public Filter.Result filter(Logger logger, org.apache.logging.log4j.Level level, org.apache.logging.log4j.Marker marker, String msg, Object... params)
public final Filter.Result getOnMatch()
getOnMatch in interface Filterpublic final Filter.Result getOnMismatch()
getOnMismatch in interface Filterprotected int hashCodeImpl()
hashCodeImpl in class AbstractLifeCycleCopyright © 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.