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
    • Field Detail

      • PRUDENT_MODE_UNSUPPORTED

        static final java.lang.String PRUDENT_MODE_UNSUPPORTED
        See Also:
        Constant Field Values
      • SEE_PARENT_FN_NOT_SET

        static final java.lang.String SEE_PARENT_FN_NOT_SET
        See Also:
        Constant Field Values
      • maxIndex

        int maxIndex
      • minIndex

        int minIndex
      • ZIP_ENTRY_DATE_PATTERN

        public static final java.lang.String ZIP_ENTRY_DATE_PATTERN
        See Also:
        Constant Field Values
      • MAX_WINDOW_SIZE

        private static int MAX_WINDOW_SIZE
        It's almost always a bad idea to have a large window size, say over 20.
    • Constructor Detail

      • FixedWindowRollingPolicy

        public FixedWindowRollingPolicy()
    • Method Detail

      • getMaxWindowSize

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

        private java.lang.String transformFileNamePatternFromInt2Date​(java.lang.String fileNamePatternStr)
      • getActiveFileName

        public java.lang.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)