Class FileAppenderConfig

  • All Implemented Interfaces:
    io.bootique.config.PolymorphicConfiguration

    public class FileAppenderConfig
    extends AppenderConfig
    Configuration for a console-based 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

      • FileAppenderConfig

        public FileAppenderConfig()
    • Method Detail

      • getFile

        public File getFile()
        Replies the target file.
        Returns:
        the target.
      • setFile

        public void setFile​(File file)
        Change the target file.
        Parameters:
        file - the target.
      • getAppend

        public boolean getAppend()
        Replies if the appender writes at the end of the existing file or not.
        Returns:
        true if log messages are appended at the end of thefile, false if the previous content of the file is destroyed.
      • setAppend

        public void setAppend​(boolean append)
        Set if the appender writes at the end of the existing file or not.
        Parameters:
        append - true if log messages are appended at the end of thefile, false if the previous content of the file is destroyed.
      • getEncoding

        public String getEncoding()
        Replies the console encoding.
        Returns:
        the encoding.
      • setEncoding

        public void setEncoding​(String encoding)
        Change the console encoding.
        Parameters:
        encoding - the console encoding.
      • getImmediateFlush

        public boolean getImmediateFlush()
        Replies if the text is flushed as soon as it it given to the logger.
        Returns:
        true for immediate flushing.
      • setImmediateFlush

        public void setImmediateFlush​(boolean flush)
        Change if the text is flushed as soon as it it given to the logger.
        Parameters:
        flush - true for immediate flushing.
      • getThreshold

        public Level getThreshold()
        Replies if the text is flushed as soon as it it given to the logger.
        Returns:
        true for immediate flushing.
      • setThreshold

        public void setThreshold​(Level threshold)
        Set the threshold level. All log events with lower level than the threshold level are ignored by the appender.
        Parameters:
        threshold - the threshold level.
      • createAppender

        public org.apache.log4j.Appender createAppender​(String defaultLogFormat)
        Description copied from class: AppenderConfig
        Create an appender with the current configuration.
        Specified by:
        createAppender in class AppenderConfig
        Parameters:
        defaultLogFormat - the default log format.
        Returns:
        the appender.