public class RollingFileAppender<E> extends FileAppender<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
rawFilePropertyappend, fileNameencoder, lockname, startedcontext| Constructor and Description |
|---|
RollingFileAppender()
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFile()
Returns the value of the
File property.
|
RollingPolicy |
getRollingPolicy()
|
TriggeringPolicy |
getTriggeringPolicy()
|
void |
rollover()
Implemented by delegating most of the rollover work to a rolling policy.
|
void |
setFile(String
The
File property takes a string value which should be the name of the file to append to.
|
void |
setRollingPolicy(RollingPolicy
Sets the rolling policy.
|
void |
setTriggeringPolicy(TriggeringPolicy
|
void |
start()
If the value of
File is not
null, then
FileAppender is called with the values of
File and
Append properties.
|
void |
stop()
Stop this appender instance.
|
protected void |
subAppend(E event)
This method differentiates RollingFileAppender from its super class.
|
isAppend, isPrudent, openFile, rawFileProperty, setAppend, setPrudent, writeOutappend, closeOutputStream, getEncoder, getOutputStream, setEncoder, setLayout, setOutputStreamaddFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContextpublic void start()
FileAppender
null, then
FileAppender.openFile(java.lang.String) is called with the values of
File and
Append properties.
public void stop()
OutputStreamAppender
Stopped appenders cannot be reused.
public void setFile(Stringfile)
FileAppender
public StringgetFile()
FileAppender
This method may be overridden by derived classes.
public void rollover()
protected void subAppend(E event)
public RollingPolicygetRollingPolicy()
public TriggeringPolicy<E> getTriggeringPolicy()
public void setRollingPolicy(RollingPolicypolicy)
TriggeringPolicy, then the triggering policy for this appender is automatically set to be the policy argument.
policy -
public void setTriggeringPolicy(TriggeringPolicy<E> policy)