Interface AppenderConfig

All Known Implementing Classes:
AppenderConfigImpl

public interface AppenderConfig
The configuration interface for the InMemoryLogAppender.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates an instance of AppenderConfig which may be used to populate the configuration options.
    filter(Predicate<ch.qos.logback.classic.spi.ILoggingEvent> filter)
    Configures a filter which will be used to allow only log events matching the filter to be appended.
    filter(org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent> filter)
    Configures a filter which will be used to allow only log events matching the filter to be appended.
    loggedClass(Class<?> loggedClass)
    Configures a logger by type to be captured by the appender.
    logger(org.slf4j.Logger logger)
    Configures a logger instance to be captured by the appender.
    loggerNamed(String loggerName)
    Configures a logger by name to be captured by the appender.
  • Method Details

    • configure

      static AppenderConfig configure()
      Creates an instance of AppenderConfig which may be used to populate the configuration options.
      Returns:
      an instance of AppenderConfig
    • logger

      AppenderConfig logger(org.slf4j.Logger logger)
      Configures a logger instance to be captured by the appender.
      Parameters:
      logger - the logger instance
      Returns:
      a reference to this configuration
    • loggerNamed

      default AppenderConfig loggerNamed(String loggerName)
      Configures a logger by name to be captured by the appender.
      Parameters:
      loggerName - the logger name
      Returns:
      a reference to this configuration
    • loggedClass

      default AppenderConfig loggedClass(Class<?> loggedClass)
      Configures a logger by type to be captured by the appender. Assuming the standard convention of using the class for the logger name, this should generally be the class being logged.
      Parameters:
      loggedClass - the logged class
      Returns:
      a reference to this configuration
    • filter

      AppenderConfig filter(org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent> filter)
      Configures a filter which will be used to allow only log events matching the filter to be appended. Only one filter may be defined, if this is called twice, the last one will be used.
      Parameters:
      filter - the filter
      Returns:
      a reference to this configuration
    • filter

      default AppenderConfig filter(Predicate<ch.qos.logback.classic.spi.ILoggingEvent> filter)
      Configures a filter which will be used to allow only log events matching the filter to be appended. Only one filter may be defined, if this is called twice, the last one will be used.
      Parameters:
      filter - the filter
      Returns:
      a reference to this configuration