Class AppenderConfig

  • All Implemented Interfaces:
    io.bootique.config.PolymorphicConfiguration
    Direct Known Subclasses:
    ConsoleAppenderConfig, FileAppenderConfig

    public abstract class AppenderConfig
    extends Object
    implements io.bootique.config.PolymorphicConfiguration
    Configuration for log4j appenders.
    Since:
    15.0
    Version:
    17.0 2020-01-04 14:41:57
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.bootique
    Maven Artifact Id:
    bootique-log4j
    • Constructor Detail

      • AppenderConfig

        public AppenderConfig()
    • Method Detail

      • getLogFormat

        public String getLogFormat()
        Replies the format of the log.
        Returns:
        the format, or null if no format was specified.
      • setLogFormat

        public void setLogFormat​(String format)
        Change the format of the log.
        Parameters:
        format - the format.
      • getLayout

        public LayoutType getLayout()
        Replies the type of layout that should be used by this appender. Default is LayoutType.PATTERN.
        Returns:
        the type of layout.
      • setLayout

        public void setLayout​(LayoutType type)
        Change the type of layout that should be used by this appender.
        Parameters:
        type - the type of the layout.
      • createAppender

        public abstract org.apache.log4j.Appender createAppender​(String defaultLogFormat)
        Create an appender with the current configuration.
        Parameters:
        defaultLogFormat - the default log format.
        Returns:
        the appender.
      • createLayout

        protected org.apache.log4j.Layout createLayout​(String defaultLogFormat)
        Create a layout from this appender configuration.
        Parameters:
        defaultLogFormat - the default log format.
        Returns:
        the layout.