|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<E>
ch.qos.logback.core.WriterAppender<E>
ch.qos.logback.core.FileAppender<E>
ch.qos.logback.core.rolling.RollingFileAppender<E>
public class RollingFileAppender<E>
RollingFileAppender
extends FileAppender
to backup the
log files depending on RollingPolicy
and TriggeringPolicy
.
For more information about this appender, please refer to the online manual at http://logback.qos.ch/manual/appenders.html#RollingFileAppender
Field Summary |
---|
Fields inherited from class ch.qos.logback.core.FileAppender |
---|
append, bufferedIO, bufferSize, fileName |
Fields inherited from class ch.qos.logback.core.AppenderBase |
---|
name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
RollingFileAppender()
The default constructor simply calls its parents constructor . |
Method Summary | |
---|---|
String |
getFile()
Returns the value of the File property. |
RollingPolicy |
getRollingPolicy()
|
TriggeringPolicy |
getTriggeringPolicy()
|
void |
rollover()
Implements the usual roll over behaviour. |
void |
setRollingPolicy(RollingPolicy policy)
Sets the rolling policy. |
void |
setTriggeringPolicy(TriggeringPolicy<E> policy)
|
void |
start()
If the value of File is not null , then
FileAppender.openFile(java.lang.String) is called with the values of File and Append
properties. |
protected void |
subAppend(E event)
This method differentiates RollingFileAppender from its super class. |
Methods inherited from class ch.qos.logback.core.FileAppender |
---|
getAppend, getBufferSize, isAppend, isBufferedIO, isPrudent, openFile, rawFileProperty, setAppend, setBufferedIO, setBufferSize, setFile, setPrudent, writerWrite |
Methods inherited from class ch.qos.logback.core.WriterAppender |
---|
append, closeWriter, createWriter, getEncoding, getImmediateFlush, getLayout, setEncoding, setImmediateFlush, setLayout, setWriter, stop |
Methods inherited from class ch.qos.logback.core.AppenderBase |
---|
addFilter, clearAllFilters, doAppend, getFilterChainDecision, getFirstFilter, getName, isStarted, setName, toString |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
Constructor Detail |
---|
public RollingFileAppender()
parents constructor
.
Method Detail |
---|
public void start()
FileAppender
null
, then
FileAppender.openFile(java.lang.String)
is called with the values of File and Append
properties.
start
in interface LifeCycle
start
in class FileAppender<E>
public String getFile()
FileAppender
This method may be overridden by derived classes.
getFile
in class FileAppender<E>
public void rollover()
If MaxBackupIndex
is positive, then files {File.1
,
..., File.MaxBackupIndex -1
} are renamed to {File.2
,
..., File.MaxBackupIndex
}. Moreover, File
is
renamed File.1
and closed. A new File
is
created to receive further log output.
If MaxBackupIndex
is equal to zero, then the
File
is truncated with no backup files created.
protected void subAppend(E event)
subAppend
in class WriterAppender<E>
public RollingPolicy getRollingPolicy()
public TriggeringPolicy getTriggeringPolicy()
public void setRollingPolicy(RollingPolicy policy)
TriggeringPolicy
, then the triggering policy for this appender is
automatically set to be the policy argument.
policy
- public void setTriggeringPolicy(TriggeringPolicy<E> policy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |