Class FixedWindowRollingPolicy

All Implemented Interfaces:
RollingPolicy, ContextAware, LifeCycle

public class FixedWindowRollingPolicy extends RollingPolicyBase
When rolling over, FixedWindowRollingPolicy renames files according to a fixed window algorithm. For more information about this policy, please refer to the online manual at http://logback.qos.ch/manual/appenders.html#FixedWindowRollingPolicy
Author:
Ceki Gülcü
  • Field Details

  • Constructor Details

    • FixedWindowRollingPolicy

      public FixedWindowRollingPolicy()
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface LifeCycle
      Overrides:
      start in class RollingPolicyBase
    • getMaxWindowSize

      protected int getMaxWindowSize()
      Subclasses can override this method to increase the max window size, if required. This is to address LOGBACK-266.
      Returns:
    • rollover

      public void rollover() throws RolloverFailure
      Description copied from interface: RollingPolicy
      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.
    • getActiveFileName

      public String getActiveFileName()
      Return the value of the parent's RawFile property.
    • getMaxIndex

      public int getMaxIndex()
    • getMinIndex

      public int getMinIndex()
    • setMaxIndex

      public void setMaxIndex(int maxIndex)
    • setMinIndex

      public void setMinIndex(int minIndex)