Top Description Methods
ch.qos.logback.core.rolling

public Interface RollingPolicy

extends LifeCycle
Known Direct Implementers
ch.qos.logback.core.rolling.RollingPolicyBase
Imports
ch.qos.logback.core.FileAppender, ch.qos.logback.core.rolling.helper.CompressionMode, ch.qos.logback.core.spi.LifeCycle

A 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.
Author
Ceki Gülcü

Method Summary

Modifier and TypeMethod and Description
public String
getActiveFileName()

Get the name of the active log file.

public CompressionMode
getCompressionMode()

The compression mode for this policy.

public void
rollover()

Rolls over log files according to implementation policy.

public void
setParent(FileAppender<?> appender)

This method allows RollingPolicy implementations to be aware of their containing appender.

Inherited from ch.qos.logback.core.spi.LifeCycle:
isStartedstartstop

Method Detail

getActiveFileNameback to summary
public String getActiveFileName()

Get the name of the active log file.

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.

getCompressionModeback to summary
public CompressionMode getCompressionMode()

The compression mode for this policy.

rolloverback to summary
public void rollover() throws RolloverFailure

Rolls over log files according to implementation policy.

This method is invoked by RollingFileAppender, usually at the behest of its TriggeringPolicy.

Exceptions
RolloverFailure:
Thrown if the rollover operation fails for any reason.
setParentback to summary
public void setParent(FileAppender<?> appender)

This method allows RollingPolicy implementations to be aware of their containing appender.