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 |
---|---|
java.lang.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<?> appender)
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.java.lang.String getActiveFileName()
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.
CompressionMode getCompressionMode()
void setParent(FileAppender<?> appender)
appender
- Copyright © 2010 - 2020 Adobe. All Rights Reserved