@Plugin(name="TimeFilter", category="Core", elementType="filter", printObject=true) public final class TimeFilter extends AbstractFilter
Filter.ResultLifeCycle.StateonMatch, onMismatchDEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERELEMENT_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, hashCodeImplgetState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stoppublic Filter.Result filter(LogEvent event)
AbstractFilterfilter in interface Filterfilter in class AbstractFilterevent - 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.