org.apache.logging.log4j.core.filter
Interface Filterable

All Superinterfaces:
LifeCycle
All Known Subinterfaces:
Configuration
All Known Implementing Classes:
AbstractAppender, AbstractConfiguration, AbstractDatabaseAppender, AbstractFilterable, AbstractOutputStreamAppender, AppenderControl, AsyncAppender, AsyncLoggerConfig, AsyncLoggerConfig.RootLogger, ConsoleAppender, DefaultConfiguration, FailoverAppender, FileAppender, JdbcAppender, JmsQueueAppender, JmsTopicAppender, JpaAppender, JsonConfiguration, LoggerConfig, LoggerConfig.RootLogger, NullConfiguration, RandomAccessFileAppender, RewriteAppender, RollingFileAppender, RollingRandomAccessFileAppender, RoutingAppender, SmtpAppender, SocketAppender, SyslogAppender, XmlConfiguration, YamlConfiguration

public interface Filterable
extends LifeCycle

Interface implemented by Classes that allow filtering to occur.

Extends LifeCycle since filters have a life cycle.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
 
Method Summary
 void addFilter(Filter filter)
          Adds a new Filter.
 Filter getFilter()
          Returns an Iterator for all the Filters.
 boolean hasFilter()
          Determine if a Filter is present.
 boolean isFiltered(LogEvent event)
          Determines if the event should be filtered.
 void removeFilter(Filter filter)
          Removes a Filter.
 
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle
isStarted, isStopped, start, stop
 

Method Detail

addFilter

void addFilter(Filter filter)
Adds a new Filter. If a Filter already exists it is converted to a CompositeFilter.

Parameters:
filter - The Filter to add.

removeFilter

void removeFilter(Filter filter)
Removes a Filter.

Parameters:
filter - The Filter to remove.

getFilter

Filter getFilter()
Returns an Iterator for all the Filters.

Returns:
an Iterator for all the Filters.

hasFilter

boolean hasFilter()
Determine if a Filter is present.

Returns:
true if a Filter is present, false otherwise.

isFiltered

boolean isFiltered(LogEvent event)
Determines if the event should be filtered.

Parameters:
event - The LogEvent.
Returns:
true if the event should be filtered, false otherwise.


Copyright © 1999-2014 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.