public interface RollingPolicy extends LifeCycle
RollingPolicy is responsible for performing the rolling over of the active log file. The
RollingPolicy is also responsible for providing the
active log file, that is the live file where logging output will be directed.
| Modifier and Type | Method and Description |
|---|---|
String |
getActiveFileName()
Get the name of the active log file.
|
CompressionMode |
getCompressionMode()
The compression mode for this policy.
|
void |
rollover()
Rolls over log files according to implementation policy.
|
void |
setParent(FileAppender
This method allows RollingPolicy implementations to be aware of their containing appender.
|
void rollover()
throws RolloverFailure
This method is invoked by RollingFileAppender, usually at the behest of its TriggeringPolicy.
RolloverFailure - Thrown if the rollover operation fails for any reason.
StringgetActiveFileName()
With implementations such as TimeBasedRollingPolicy, this method returns a new file name, where the actual output will be sent.
On other implementations, this method might return the FileAppender's file property.
CompressionModegetCompressionMode()
void setParent(FileAppenderappender)
appender -