Interface AppenderConfig
- All Known Implementing Classes:
AppenderConfigImpl
public interface AppenderConfig
The configuration interface for the
InMemoryLogAppender
.-
Method Summary
Modifier and TypeMethodDescriptionstatic AppenderConfig
Creates an instance ofAppenderConfig
which may be used to populate the configuration options.default AppenderConfig
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.default AppenderConfig
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.default AppenderConfig
loggerNamed
(String loggerName) Configures a logger by name to be captured by the appender.
-
Method Details
-
configure
Creates an instance ofAppenderConfig
which may be used to populate the configuration options.- Returns:
- an instance of AppenderConfig
-
logger
Configures a logger instance to be captured by the appender.- Parameters:
logger
- the logger instance- Returns:
- a reference to this configuration
-
loggerNamed
Configures a logger by name to be captured by the appender.- Parameters:
loggerName
- the logger name- Returns:
- a reference to this configuration
-
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
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
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
-