Top Description Fields Constructors Methods
ch.qos.logback.core.rolling

public Class FixedWindowRollingPolicy

extends RollingPolicyBase
Class Inheritance
Static Imports
ch.qos.logback.core.CoreConstants.CODES_URL

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

Modifier and TypeField and Description
pack-priv Compressor
pack-priv static final String
private static int
MAX_WINDOW_SIZE

It's almost always a bad idea to have a large window size, say over 20.

pack-priv int
pack-priv int
pack-priv static final String
pack-priv static final String
pack-priv RenameUtil
public static final String
Inherited from ch.qos.logback.core.rolling.RollingPolicyBase:
compressionModefileNamePatternfileNamePatternStrzipEntryFileNamePattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getActiveFileName()

Implements ch.qos.logback.core.rolling.RollingPolicy.getActiveFileName.

Return the value of the parent's RawFile property.
public int
protected int
getMaxWindowSize()

Subclasses can override this method to increase the max window size, if required.

public int
public void
rollover()

Implements ch.qos.logback.core.rolling.RollingPolicy.rollover.

Rolls over log files according to implementation policy.
public void
setMaxIndex(int maxIndex)

public void
setMinIndex(int minIndex)

public void
private String
Inherited from ch.qos.logback.core.rolling.RollingPolicyBase:
determineCompressionModegetCompressionModegetFileNamePatterngetParentsRawFilePropertyisParentPrudentisStartedsetFileNamePatternsetParentstop

Field Detail

compressorback to summary
pack-priv Compressor compressor
FNP_NOT_SETback to summary
pack-priv static final String FNP_NOT_SET
MAX_WINDOW_SIZEback to summary
private static int MAX_WINDOW_SIZE

It's almost always a bad idea to have a large window size, say over 20.

maxIndexback to summary
pack-priv int maxIndex
minIndexback to summary
pack-priv int minIndex
PRUDENT_MODE_UNSUPPORTEDback to summary
pack-priv static final String PRUDENT_MODE_UNSUPPORTED
SEE_PARENT_FN_NOT_SETback to summary
pack-priv static final String SEE_PARENT_FN_NOT_SET
utilback to summary
pack-priv RenameUtil util
ZIP_ENTRY_DATE_PATTERNback to summary
public static final String ZIP_ENTRY_DATE_PATTERN

Constructor Detail

FixedWindowRollingPolicyback to summary
public FixedWindowRollingPolicy()

Method Detail

getActiveFileNameback to summary
public String getActiveFileName()

Implements ch.qos.logback.core.rolling.RollingPolicy.getActiveFileName.

Return the value of the parent's RawFile property.

getMaxIndexback to summary
public int getMaxIndex()
getMaxWindowSizeback to summary
protected int getMaxWindowSize()

Subclasses can override this method to increase the max window size, if required. This is to address LOGBACK-266.

getMinIndexback to summary
public int getMinIndex()
rolloverback to summary
public void rollover() throws RolloverFailure

Implements ch.qos.logback.core.rolling.RollingPolicy.rollover.

Doc from ch.qos.logback.core.rolling.RollingPolicy.rollover.

Rolls over log files according to implementation policy.

This method is invoked by RollingFileAppender, usually at the behest of its TriggeringPolicy.

Exceptions
RolloverFailure:
Thrown if the rollover operation fails for any reason.
setMaxIndexback to summary
public void setMaxIndex(int maxIndex)
setMinIndexback to summary
public void setMinIndex(int minIndex)
startback to summary
public void start()

Overrides ch.qos.logback.core.rolling.RollingPolicyBase.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

transformFileNamePatternFromInt2Dateback to summary
private String transformFileNamePatternFromInt2Date(String fileNamePatternStr)