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<E> |
getTriggeringPolicy() |
void |
rollover()
Implemented by delegating most of the rollover work to a rolling policy.
|
void |
setFile(String file)
The File property takes a string value which should be the name of
the file to append to.
|
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. |
void |
stop()
Stop this appender instance.
|
protected void |
subAppend(E event)
This method differentiates RollingFileAppender from its super class.
|
getLazy, isAppend, isPrudent, openFile, rawFileProperty, setAppend, setLazy, 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()
FileAppendernull, then
FileAppender.openFile(java.lang.String) is called with the values of File and
Append properties.start in interface LifeCyclestart in class FileAppender<E>public void stop()
OutputStreamAppenderStopped appenders cannot be reused.
stop in interface LifeCyclestop in class OutputStreamAppender<E>public void setFile(String file)
FileAppendersetFile in class FileAppender<E>file - path to destination log filepublic String getFile()
FileAppendergetFile in class FileAppender<E>public void rollover()
protected void subAppend(E event)
subAppend in class FileAppender<E>event - the log eventpublic RollingPolicy getRollingPolicy()
public TriggeringPolicy<E> getTriggeringPolicy()
public void setRollingPolicy(RollingPolicy policy)
TriggeringPolicy, then the triggering policy for this appender is
automatically set to be the policy argument.policy - the desired rolling policypublic void setTriggeringPolicy(TriggeringPolicy<E> policy)
Copyright © 2005–2014 QOS.ch. All rights reserved.