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 Logback Appender instances.

To create your own, just:

  1. Create a class which implements AppenderFactory.
  2. Annotate it with @JsonTypeName and give it a unique type name.
  3. add a META-INF/services/io.dropwizard.logging.common.AppenderFactory file with your implementation's full class name to the class path.
See Also:
  • Method Summary

    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 Details

    • 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 context
      applicationName - the application name
      layoutFactory - the factory for the layout for logging
      levelFilterFactory - the factory for the level filter
      asyncAppenderFactory - the factory for the async appender
      Returns:
      a new, started Appender