@Plugin(name="TimeFilter", category="Core", elementType="filter", printObject=true) public final class TimeFilter extends AbstractFilter
Filter.Result
LifeCycle.State
onMatch, onMismatch
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
ELEMENT_TYPE
Modifier and Type | Method and Description |
---|---|
static TimeFilter |
createFilter(String start,
String end,
String tz,
Filter.Result match,
Filter.Result mismatch)
Create a TimeFilter.
|
Filter.Result |
filter(LogEvent event)
Context Filter method.
|
String |
toString() |
equalsImpl, filter, filter, filter, getOnMatch, getOnMismatch, hashCodeImpl
getState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop
public Filter.Result filter(LogEvent event)
AbstractFilter
filter
in interface Filter
filter
in class AbstractFilter
event
- The LogEvent.public String toString()
toString
in class AbstractFilter
@PluginFactory public static TimeFilter createFilter(@PluginAttribute(value="start") String start, @PluginAttribute(value="end") String end, @PluginAttribute(value="timezone") String tz, @PluginAttribute(value="onMatch") Filter.Result match, @PluginAttribute(value="onMismatch") Filter.Result mismatch)
start
- The start time.end
- The end time.tz
- timezone.match
- Action to perform if the time matches.mismatch
- Action to perform if the action does not match.Copyright © 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.