Package com.atlassian.confluence.logging
Class ConfluenceHomeLogAppender
- java.lang.Object
-
- org.apache.log4j.AppenderSkeleton
-
- org.apache.log4j.WriterAppender
-
- com.atlassian.confluence.logging.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.0A 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 Summary
Constructors Constructor Description ConfluenceHomeLogAppender()Deprecated.Creates the delegate Appenders although they are not ready for use untilactivateOptions()is called.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactivateOptions()Deprecated.Activate the default Appender (ConsoleAppender).voidappend(org.apache.log4j.spi.LoggingEvent event)Deprecated.Append to the current delegate Appender.voidclose()Deprecated.FilegetFile()Deprecated.org.apache.log4j.LayoutgetLayout()Deprecated.StringgetLogFileName()Deprecated.intgetMaxBackupIndex()Deprecated.longgetMaximumFileSize()Deprecated.voidrollOver()Deprecated.since 7.14 UseLogAppenderController.rolloverAppenders()voidsetLayout(org.apache.log4j.Layout layout)Deprecated.voidsetLogFileName(String file)Deprecated.voidsetMaxBackupIndex(int maxBackups)Deprecated.voidsetMaxFileSize(String value)Deprecated.static voidswitchAppenders()Deprecated.since 7.14static voidupdateAppenders(Consumer<org.apache.log4j.Appender> updater)Deprecated.since 7.14-
Methods inherited from class org.apache.log4j.WriterAppender
checkEntryConditions, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, subAppend, writeFooter, writeHeader
-
-
-
-
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:
activateOptionsin interfaceorg.apache.log4j.spi.OptionHandler- Overrides:
activateOptionsin classorg.apache.log4j.WriterAppender- See Also:
configureLogDirectory(File)
-
getLayout
public org.apache.log4j.Layout getLayout()
Deprecated.- Specified by:
getLayoutin interfaceorg.apache.log4j.Appender- Overrides:
getLayoutin classorg.apache.log4j.AppenderSkeleton
-
setLayout
public void setLayout(org.apache.log4j.Layout layout)
Deprecated.- Specified by:
setLayoutin interfaceorg.apache.log4j.Appender- Overrides:
setLayoutin classorg.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:
appendin classorg.apache.log4j.WriterAppender- Parameters:
event- the information to log.
-
close
public void close()
Deprecated.- Specified by:
closein interfaceorg.apache.log4j.Appender- Overrides:
closein classorg.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
-
rollOver
@Deprecated public void rollOver()
Deprecated.since 7.14 UseLogAppenderController.rolloverAppenders()
-
getFile
public File getFile()
Deprecated.
-
-