Logback API
Version 0.9.8

ch.qos.logback.core.rolling
Interface RollingPolicy

All Superinterfaces:
LifeCycle
All Known Implementing Classes:
FixedWindowRollingPolicy, RollingPolicyBase, TimeBasedRollingPolicy

public interface RollingPolicy
extends 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
 String getNewActiveFileName()
          Get the new name of the active log file.
 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.
 
Methods inherited from interface ch.qos.logback.core.spi.LifeCycle
isStarted, start, stop
 

Method Detail

rollover

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.

Throws:
RolloverFailure - Thrown if the rollover operation fails for any reason.

getNewActiveFileName

String getNewActiveFileName()
Get the new 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 some implementations, this method might return the FileAppender's file attribute.


setParent

void setParent(FileAppender appender)
This method allows RollingPolicy implementations to be aware of their containing appender.

Parameters:
appender -

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.