org.apache.log4j.rolling

## Interface RollingPolicy

- All Superinterfaces:
    org.apache.log4j.spi.OptionHandler
  All Known Implementing Classes:
    FixedWindowRollingPolicy, RollingPolicyBase, TimeBasedRollingPolicy

      public interface RollingPolicy
      extends org.apache.log4j.spi.OptionHandler

  A `RollingPolicy` specifies the actions taken on a logging file rollover.
  Author:
    Ceki Gülcü, Curt Arnold

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RolloverDescription` | `initialize(String file, boolean append)` Initialize the policy and return any initial actions for rolling file appender..
    `RolloverDescription` | `rollover(String activeFile)` Prepare for a rollover.

    - ### Methods inherited from interface org.apache.log4j.spi.OptionHandler

      `activateOptions`

- - ### Method Detail

    - #### initialize

          RolloverDescription initialize(String file,
                                       boolean append)
                                         throws SecurityException

      Initialize the policy and return any initial actions for rolling file appender..
      Parameters:
        `file` - current value of RollingFileAppender.getFile().
        `append` - current value of RollingFileAppender.getAppend().
      Returns:
        Description of the initialization, may be null to indicate no initialization needed.
      Throws:
        `SecurityException` - if denied access to log files.

    - #### rollover

          RolloverDescription rollover(String activeFile)
                                       throws 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:
        `SecurityException` - if denied access to log files.

Copyright © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.