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#RollingFileAppenderDEFAULT_BUFFER_SIZE| Constructor and Description |
|---|
RollingFileAppender() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.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(java.lang.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.
|
isAppend, isPrudent, openFile, rawFileProperty, setAppend, setBufferSize, setPrudentgetEncoder, getOutputStream, isImmediateFlush, setEncoder, setImmediateFlush, setLayout, setOutputStreamaddFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContextequals, 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 FileAppender<E>public void setFile(java.lang.String file)
FileAppendersetFile in class FileAppender<E>public java.lang.String getFile()
FileAppenderThis method may be overridden by derived classes.
getFile in class FileAppender<E>public void rollover()
public 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 - public void setTriggeringPolicy(TriggeringPolicy<E> policy)
Copyright © 2010 - 2023 Adobe. All Rights Reserved