public class FixedWindowRollingPolicy extends RollingPolicyBase
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| Modifier and Type | Field and Description |
|---|---|
(package private) Compressor |
compressor |
(package private) static java.lang.String |
FNP_NOT_SET |
private static int |
MAX_WINDOW_SIZE
It's almost always a bad idea to have a large window size, say over 20.
|
(package private) int |
maxIndex |
(package private) int |
minIndex |
(package private) static java.lang.String |
PRUDENT_MODE_UNSUPPORTED |
(package private) static java.lang.String |
SEE_PARENT_FN_NOT_SET |
(package private) RenameUtil |
util |
static java.lang.String |
ZIP_ENTRY_DATE_PATTERN |
compressionMode, fileNamePattern, fileNamePatternStr, zipEntryFileNamePatterncontext| Constructor and Description |
|---|
FixedWindowRollingPolicy() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getActiveFileName()
Return the value of the parent's RawFile property.
|
int |
getMaxIndex() |
protected int |
getMaxWindowSize()
Subclasses can override this method to increase the max window size, if required.
|
int |
getMinIndex() |
void |
rollover()
Rolls over log files according to implementation policy.
|
void |
setMaxIndex(int maxIndex) |
void |
setMinIndex(int minIndex) |
void |
start() |
private java.lang.String |
transformFileNamePatternFromInt2Date(java.lang.String fileNamePatternStr) |
determineCompressionMode, getCompressionMode, getFileNamePattern, getParentsRawFileProperty, isParentPrudent, isStarted, setFileNamePattern, setParent, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextstatic final java.lang.String FNP_NOT_SET
static final java.lang.String PRUDENT_MODE_UNSUPPORTED
static final java.lang.String SEE_PARENT_FN_NOT_SET
int maxIndex
int minIndex
RenameUtil util
Compressor compressor
public static final java.lang.String ZIP_ENTRY_DATE_PATTERN
private static int MAX_WINDOW_SIZE
public void start()
start in interface LifeCyclestart in class RollingPolicyBaseprotected int getMaxWindowSize()
private java.lang.String transformFileNamePatternFromInt2Date(java.lang.String fileNamePatternStr)
public void rollover()
throws RolloverFailure
RollingPolicyThis method is invoked by RollingFileAppender, usually at the
behest of its TriggeringPolicy.
RolloverFailure - Thrown if the rollover operation fails for any reason.public java.lang.String getActiveFileName()
public int getMaxIndex()
public int getMinIndex()
public void setMaxIndex(int maxIndex)
public void setMinIndex(int minIndex)