Interface Filterable

All Superinterfaces:
LifeCycle
All Known Subinterfaces:
Configuration
All Known Implementing Classes:
AbstractAppender, AbstractConfiguration, AbstractDatabaseAppender, AbstractFileAppender, AbstractFilterable, AbstractOutputStreamAppender, AbstractWriterAppender, AppenderControl, AsyncAppender, AsyncLoggerConfig, AsyncLoggerConfig.RootLogger, BuiltConfiguration, CompositeConfiguration, ConsoleAppender, CountingNoOpAppender, DefaultConfiguration, FailoverAppender, FileAppender, HttpAppender, JdbcAppender, JeroMqAppender, JmsAppender, JsonConfiguration, KafkaAppender, LoggerConfig, LoggerConfig.RootLogger, MemoryMappedFileAppender, NoSqlAppender, NullAppender, NullConfiguration, OutputStreamAppender, PropertiesConfiguration, RandomAccessFileAppender, RewriteAppender, RollingFileAppender, RollingRandomAccessFileAppender, RoutingAppender, ScriptAppenderSelector, SmtpAppender, SocketAppender, SyslogAppender, WriterAppender, XmlConfiguration, YamlConfiguration

public interface Filterable extends LifeCycle
Interface implemented by Classes that allow filtering to occur.

Extends LifeCycle since filters have a life cycle.

  • Method Details

    • 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.