Package ch.qos.logback.core.rolling
Class RollingPolicyBase
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.RollingPolicyBase
- All Implemented Interfaces:
RollingPolicy,ContextAware,LifeCycle
- Direct Known Subclasses:
FixedWindowRollingPolicy,TimeBasedRollingPolicy
Implements methods common to most, it not all, rolling policies. Currently
such methods are limited to a compression mode getter/setter.
- Author:
- Ceki Gülcü
-
Field Summary
FieldsFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGiven the FileNamePattern string, this method determines the compression mode depending on last letters of the fileNamePatternStr.The compression mode for this policy.booleanbooleanvoidsetFileNamePattern(String fnp) voidsetParent(FileAppender<?> appender) This method allows RollingPolicy implementations to be aware of their containing appender.voidstart()voidstop()Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.rolling.RollingPolicy
getActiveFileName, rollover
-
Field Details
-
compressionMode
-
fileNamePatternStr
-
-
Constructor Details
-
RollingPolicyBase
public RollingPolicyBase()
-
-
Method Details
-
determineCompressionMode
Given the FileNamePattern string, this method determines the compression mode depending on last letters of the fileNamePatternStr. Patterns ending with .gz imply GZIP compression, endings with '.zip' imply ZIP compression. Otherwise and by default, there is no compression. -
setFileNamePattern
-
getFileNamePattern
-
getCompressionMode
Description copied from interface:RollingPolicyThe compression mode for this policy.- Specified by:
getCompressionModein interfaceRollingPolicy- Returns:
-
isStarted
-
start
-
stop
-
setParent
Description copied from interface:RollingPolicyThis method allows RollingPolicy implementations to be aware of their containing appender.- Specified by:
setParentin interfaceRollingPolicy
-
isParentPrudent
-
getParentsRawFileProperty
-