|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.filter.FilterBase
org.apache.logging.log4j.core.filter.ThresholdFilter
public final class ThresholdFilter
This filter returns the onMatch result if the level in the LogEvent is the same or more specific than the configured level and the onMismatch value otherwise. For example, if the ThresholdFilter is configured with Level ERROR and the LogEvent contains Level DEBUG then the onMismatch value will be returned since ERROR events are more specific than DEBUG. The default Level is ERROR.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.Filter |
---|
Filter.Result |
Field Summary |
---|
Fields inherited from class org.apache.logging.log4j.core.filter.FilterBase |
---|
LOGGER, onMatch, onMismatch |
Method Summary | |
---|---|
static ThresholdFilter |
createFilter(String loggerLevel,
String match,
String mismatch)
Create a ThresholdFilter. |
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 |
toString()
|
Methods inherited from class org.apache.logging.log4j.core.filter.FilterBase |
---|
getOnMatch, getOnMismatch, isStarted, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Filter.Result filter(Logger logger, Level level, Marker marker, String msg, Object[] params)
FilterBase
filter
in interface Filter
filter
in class FilterBase
logger
- the Logger.level
- The logging Level.marker
- The Marker, if any.msg
- The message, if present.params
- An array of parameters or null.
public Filter.Result filter(Logger logger, Level level, Marker marker, Object msg, Throwable t)
FilterBase
filter
in interface Filter
filter
in class FilterBase
logger
- 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, Message msg, Throwable t)
FilterBase
filter
in interface Filter
filter
in class FilterBase
logger
- 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(LogEvent event)
FilterBase
filter
in interface Filter
filter
in class FilterBase
event
- The LogEvent.
public String toString()
toString
in class FilterBase
public static ThresholdFilter createFilter(String loggerLevel, String match, String mismatch)
loggerLevel
- The log Level.match
- The action to take on a match.mismatch
- The action to take on a mismatch.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |