org.apache.logging.log4j.core.filter
Class TimeFilter
java.lang.Object
org.apache.logging.log4j.core.filter.AbstractFilter
org.apache.logging.log4j.core.filter.TimeFilter
- All Implemented Interfaces:
- Filter, LifeCycle
public final class TimeFilter
- extends AbstractFilter
Filters events that fall within a specified time period in each day.
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.Filter |
Filter.Result |
filter
public Filter.Result filter(LogEvent event)
- Description copied from class:
AbstractFilter
- Context Filter method. The default returns NEUTRAL.
- Specified by:
filter
in interface Filter
- Overrides:
filter
in class AbstractFilter
- Parameters:
event
- The LogEvent.
- Returns:
- The Result of filtering.
toString
public String toString()
- Overrides:
toString
in class AbstractFilter
createFilter
public static TimeFilter createFilter(String start,
String end,
String tz,
String match,
String mismatch)
- Create a TimeFilter.
- Parameters:
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.
- Returns:
- A TimeFilter.
Copyright © 1999-2013 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.