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, writeHeader
public 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.OptionHandler
activateOptions
in class org.apache.log4j.WriterAppender
switchAppender()
public org.apache.log4j.Layout getLayout()
getLayout
in interface org.apache.log4j.Appender
getLayout
in class org.apache.log4j.AppenderSkeleton
public void setLayout(org.apache.log4j.Layout layout)
setLayout
in interface org.apache.log4j.Appender
setLayout
in class org.apache.log4j.AppenderSkeleton
public 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.WriterAppender
event
- the information to log.public void close()
close
in interface org.apache.log4j.Appender
close
in class org.apache.log4j.WriterAppender
public static void switchAppenders()
public static void updateAppenders(Consumer<org.apache.log4j.Appender> updater)
Copyright © 2003–2019 Atlassian. All rights reserved.