java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.RollingPolicyBase
ch.qos.logback.core.rolling.FixedWindowRollingPolicy
- All Implemented Interfaces:
RollingPolicy,ContextAware,LifeCycle
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 Summary
FieldsFields inherited from class ch.qos.logback.core.rolling.RollingPolicyBase
compressionMode, fileNamePatternStrFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the value of the parent's RawFile property.intprotected intSubclasses can override this method to increase the max window size, if required.intvoidrollover()Rolls over log files according to implementation policy.voidsetMaxIndex(int maxIndex) voidsetMinIndex(int minIndex) voidstart()Methods inherited from class ch.qos.logback.core.rolling.RollingPolicyBase
determineCompressionMode, getCompressionMode, getFileNamePattern, getParentsRawFileProperty, isParentPrudent, isStarted, setFileNamePattern, setParent, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
ZIP_ENTRY_DATE_PATTERN
- See Also:
-
-
Constructor Details
-
FixedWindowRollingPolicy
public FixedWindowRollingPolicy()
-
-
Method Details
-
start
- Specified by:
startin interfaceLifeCycle- Overrides:
startin classRollingPolicyBase
-
getMaxWindowSize
Subclasses can override this method to increase the max window size, if required. This is to address LOGBACK-266.- Returns:
-
rollover
Description copied from interface:RollingPolicyRolls over log files according to implementation policy.This method is invoked by
RollingFileAppender, usually at the behest of itsTriggeringPolicy.- Throws:
RolloverFailure- Thrown if the rollover operation fails for any reason.
-
getActiveFileName
Return the value of the parent's RawFile property. -
getMaxIndex
-
getMinIndex
-
setMaxIndex
-
setMinIndex
-