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
Fields inherited from class ch.qos.logback.core.rolling.RollingPolicyBase
compressionMode, fileNamePatternStr
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the value of the parent's RawFile property.int
protected int
Subclasses can override this method to increase the max window size, if required.int
void
rollover()
Rolls over log files according to implementation policy.void
setMaxIndex
(int maxIndex) void
setMinIndex
(int minIndex) void
start()
Methods inherited from class ch.qos.logback.core.rolling.RollingPolicyBase
determineCompressionMode, getCompressionMode, getFileNamePattern, getParentsRawFileProperty, isParentPrudent, isStarted, setFileNamePattern, setParent, stop
Methods 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:
start
in interfaceLifeCycle
- Overrides:
start
in 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:RollingPolicy
Rolls 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
-