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#RollingFileAppenderrawFileProperty
DEFAULT_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, setPrudent
getEncoder, getOutputStream, isImmediateFlush, setEncoder, setImmediateFlush, setLayout, setOutputStream
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
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 void stop()
OutputStreamAppender
Stopped appenders cannot be reused.
stop
in interface LifeCycle
stop
in class FileAppender<E>
public void setFile(java.lang.String file)
FileAppender
setFile
in class FileAppender<E>
public java.lang.String getFile()
FileAppender
This 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 - 2020 Adobe. All Rights Reserved