public class ConfluenceHomeLogAppender
extends org.apache.log4j.WriterAppender
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 and Description | 
|---|
| ConfluenceHomeLogAppender()Creates the delegate Appenders although they are not ready for use until  activateOptions()is called. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | activateOptions()Activate the default Appender (ConsoleAppender). | 
| void | append(org.apache.log4j.spi.LoggingEvent event)Append to the current delegate Appender. | 
| void | close() | 
| org.apache.log4j.Layout | getLayout() | 
| String | getLogFileName() | 
| int | getMaxBackupIndex() | 
| long | getMaximumFileSize() | 
| void | setLayout(org.apache.log4j.Layout layout) | 
| void | setLogFileName(String file) | 
| void | setMaxBackupIndex(int maxBackups) | 
| void | setMaxFileSize(String value) | 
| static void | switchAppenders() | 
| static void | updateAppenders(Consumer<org.apache.log4j.Appender> updater) | 
checkEntryConditions, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, subAppend, writeFooter, writeHeaderpublic ConfluenceHomeLogAppender()
activateOptions()
 is called.public void setMaxFileSize(String value)
public long getMaximumFileSize()
public void setMaxBackupIndex(int maxBackups)
public int getMaxBackupIndex()
public void activateOptions()
activateOptions in interface org.apache.log4j.spi.OptionHandleractivateOptions in class org.apache.log4j.WriterAppenderswitchAppender()public org.apache.log4j.Layout getLayout()
getLayout in interface org.apache.log4j.AppendergetLayout in class org.apache.log4j.AppenderSkeletonpublic void setLayout(org.apache.log4j.Layout layout)
setLayout in interface org.apache.log4j.AppendersetLayout in class org.apache.log4j.AppenderSkeletonpublic void setLogFileName(String file)
file - just the log file name (not the full path)public String getLogFileName()
public void append(org.apache.log4j.spi.LoggingEvent event)
append in class org.apache.log4j.WriterAppenderevent - the information to log.public void close()
close in interface org.apache.log4j.Appenderclose in class org.apache.log4j.WriterAppenderpublic static void switchAppenders()
public static void updateAppenders(Consumer<org.apache.log4j.Appender> updater)
Copyright © 2003–2020 Atlassian. All rights reserved.