Class ConfluenceHomeLogAppender

  • All Implemented Interfaces:
    org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler
    Direct Known Subclasses:
    AtlassianDiagnosticsLogAppender, IndexLogAppender, JmxLogAppender, OutgoingMailLogAppender, SecurityLogAppender, SqlLogAppender, SynchronyLogAppender

    @Deprecated
    public class ConfluenceHomeLogAppender
    extends org.apache.log4j.WriterAppender
    Deprecated.
    since 7.20 For deletion in 8.0
    A Log4J appender which is aware of when the confluence.home property is set and will switch logging from the console to within the confluence.home directory.

    All the console logging will be buffered so that once the switch to logging in the confluence.home is made, all existing logs can be written to this favoured location.

    This appender accepts a subset of the RollingFileAppender's configuration, although while it is delegating to the ConsoleAppender it will only use the layout settings.

    • Constructor Detail

      • ConfluenceHomeLogAppender

        public ConfluenceHomeLogAppender()
        Deprecated.
        Creates the delegate Appenders although they are not ready for use until activateOptions() is called.
    • Method Detail

      • setMaxFileSize

        public void setMaxFileSize​(String value)
        Deprecated.
      • getMaximumFileSize

        public long getMaximumFileSize()
        Deprecated.
      • setMaxBackupIndex

        public void setMaxBackupIndex​(int maxBackups)
        Deprecated.
      • getMaxBackupIndex

        public int getMaxBackupIndex()
        Deprecated.
      • activateOptions

        public void activateOptions()
        Deprecated.
        Activate the default Appender (ConsoleAppender). The other appender will be activated once it's configuration is known which is in response to the appropriate event.
        Specified by:
        activateOptions in interface org.apache.log4j.spi.OptionHandler
        Overrides:
        activateOptions in class org.apache.log4j.WriterAppender
        See Also:
        configureLogDirectory(File)
      • getLayout

        public org.apache.log4j.Layout getLayout()
        Deprecated.
        Specified by:
        getLayout in interface org.apache.log4j.Appender
        Overrides:
        getLayout in class org.apache.log4j.AppenderSkeleton
      • setLayout

        public void setLayout​(org.apache.log4j.Layout layout)
        Deprecated.
        Specified by:
        setLayout in interface org.apache.log4j.Appender
        Overrides:
        setLayout in class org.apache.log4j.AppenderSkeleton
      • setLogFileName

        public void setLogFileName​(String file)
        Deprecated.
        Parameters:
        file - just the log file name (not the full path)
      • getLogFileName

        public String getLogFileName()
        Deprecated.
      • append

        public void append​(org.apache.log4j.spi.LoggingEvent event)
        Deprecated.
        Append to the current delegate Appender. If this is the ConsoleAppender then also buffer the event for writing when the RollingAppender is delegated to.
        Overrides:
        append in class org.apache.log4j.WriterAppender
        Parameters:
        event - the information to log.
      • close

        public void close()
        Deprecated.
        Specified by:
        close in interface org.apache.log4j.Appender
        Overrides:
        close in class org.apache.log4j.WriterAppender
      • switchAppenders

        @Deprecated
        public static void switchAppenders()
        Deprecated.
        since 7.14
      • updateAppenders

        @Deprecated
        public static void updateAppenders​(Consumer<org.apache.log4j.Appender> updater)
        Deprecated.
        since 7.14
      • getFile

        public File getFile()
        Deprecated.