Filterable, LifeCycle, LifeCycle2AbstractAppender, AbstractConfiguration, AppenderControl, LoggerConfigpublic abstract class AbstractFilterable extends AbstractLifeCycle implements Filterable
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AbstractFilterable.Builder<B extends AbstractFilterable.Builder<B>> |
Subclasses can extend this abstract Builder.
|
LifeCycle.StateDEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractFilterable() |
|
protected |
AbstractFilterable(Filter filter) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addFilter(Filter filter) |
Adds a filter.
|
Filter |
getFilter() |
Returns the Filter.
|
boolean |
hasFilter() |
Determines if a Filter is present.
|
boolean |
isFiltered(LogEvent event) |
Determine if the LogEvent should be processed or ignored.
|
void |
removeFilter(Filter filter) |
Removes a Filter.
|
void |
start() |
Make the Filter available for use.
|
boolean |
stop(long timeout,
TimeUnit timeUnit) |
Cleanup the Filter.
|
protected boolean |
stop(long timeout,
TimeUnit timeUnit,
boolean changeLifeCycleState) |
Cleanup the Filter.
|
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stopprotected AbstractFilterable(Filter filter)
protected AbstractFilterable()
public Filter getFilter()
getFilter in interface Filterablepublic void addFilter(Filter filter)
addFilter in interface Filterablefilter - The Filter to add.public void removeFilter(Filter filter)
removeFilter in interface Filterablefilter - The Filter to remove.public boolean hasFilter()
hasFilter in interface Filterablepublic void start()
start in interface LifeCyclestart in class AbstractLifeCyclepublic boolean stop(long timeout,
TimeUnit timeUnit)
stop in interface LifeCycle2stop in class AbstractLifeCycletimeout - the maximum time to waittimeUnit - the time unit of the timeout argumentprotected boolean stop(long timeout,
TimeUnit timeUnit,
boolean changeLifeCycleState)
public boolean isFiltered(LogEvent event)
isFiltered in interface Filterableevent - The LogEvent.Copyright © 1999-2018. 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.