org.x4juli.handlers.rolling
Interface RollingPolicy

All Superinterfaces:
OptionHandler
All Known Implementing Classes:
AbstractRollingPolicy

public interface RollingPolicy
extends OptionHandler

* A RollingPolicy specifies the actions taken on a logging file rollover.

Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Ceki Gülcü, Curt Arnold. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.

Since:
0.5
Author:
Boris Unckel

Method Summary
 RolloverDescription initialize(java.lang.String file, boolean append)
          Initialize the policy and return any initial actions for rolling file appender..
 RolloverDescription rollover(java.lang.String activeFile)
          Prepare for a rollover.
 
Methods inherited from interface org.x4juli.global.spi.OptionHandler
activateOptions
 

Method Detail

initialize

public RolloverDescription initialize(java.lang.String file,
                                      boolean append)
                               throws java.lang.SecurityException
Initialize the policy and return any initial actions for rolling file appender..

Parameters:
file - current value of RollingFileHandler.getFile().
append - current value of RollingFileHandler.getAppend().
Returns:
Description of the initialization, may be null to indicate no initialization needed.
Throws:
java.lang.SecurityException - if denied access to log files.
Since:
0.5

rollover

public RolloverDescription rollover(java.lang.String activeFile)
                             throws java.lang.SecurityException
Prepare for a rollover. This method is called prior to closing the active log file, performs any necessary preliminary actions and describes actions needed after close of current log file.

Parameters:
activeFile - file name for current active log file.
Returns:
Description of pending rollover, may be null to indicate no rollover at this time.
Throws:
java.lang.SecurityException - if denied access to log files.
Since:
0.5


${license_html}