Package io.dropwizard.logging.common
Interface AppenderFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware>
-
- All Superinterfaces:
Discoverable
- All Known Implementing Classes:
AbstractAppenderFactory
,AbstractOutputStreamAppenderFactory
,ConsoleAppenderFactory
,FileAppenderFactory
,SyslogAppenderFactory
,TcpSocketAppenderFactory
,TlsSocketAppenderFactory
,UdpSocketAppenderFactory
public interface AppenderFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware> extends Discoverable
A service provider interface for creating LogbackAppender
instances. To create your own, just:- Create a class which implements
AppenderFactory
. - Annotate it with
@JsonTypeName
and give it a unique type name. - add a
META-INF/services/io.dropwizard.logging.AppenderFactory
file with your implementation's full class name to the class path.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ch.qos.logback.core.Appender<E>
build(ch.qos.logback.classic.LoggerContext context, String applicationName, LayoutFactory<E> layoutFactory, LevelFilterFactory<E> levelFilterFactory, AsyncAppenderFactory<E> asyncAppenderFactory)
Given a Logback context, an application name, a layout, a levelFilterFactory, and an asyncAppenderFactory build a new appender.
-
-
-
Method Detail
-
build
ch.qos.logback.core.Appender<E> build(ch.qos.logback.classic.LoggerContext context, String applicationName, LayoutFactory<E> layoutFactory, LevelFilterFactory<E> levelFilterFactory, AsyncAppenderFactory<E> asyncAppenderFactory)
Given a Logback context, an application name, a layout, a levelFilterFactory, and an asyncAppenderFactory build a new appender.- Parameters:
context
- the Logback contextapplicationName
- the application namelayoutFactory
- the factory for the layout for logginglevelFilterFactory
- the factory for the level filterasyncAppenderFactory
- the factory for the async appender- Returns:
- a new, started
Appender
-
-