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

public abstract Class RollingPolicyBase

extends ContextAwareBase
implements RollingPolicy
Class Inheritance
All Implemented Interfaces
ch.qos.logback.core.rolling.RollingPolicy, ch.qos.logback.core.spi.LifeCycle
Known Direct Subclasses
ch.qos.logback.core.rolling.TimeBasedRollingPolicy, ch.qos.logback.core.rolling.FixedWindowRollingPolicy
Imports
ch.qos.logback.core.FileAppender, ch.qos.logback.core.rolling.helper.CompressionMode, .FileNamePattern, ch.qos.logback.core.spi.ContextAwareBase

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

Modifier and TypeField and Description
protected CompressionMode
pack-priv FileNamePattern
protected String
private FileAppender<?>
private boolean
pack-priv FileNamePattern
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
determineCompressionMode()

Given the FileNamePattern string, this method determines the compression mode depending on last letters of the fileNamePatternStr.

public CompressionMode
getCompressionMode()

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

The compression mode for this policy.
public String
public String
public boolean
public boolean
public void
public void
setParent(FileAppender<?> appender)

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

This method allows RollingPolicy implementations to be aware of their containing appender.
public void
public void
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

compressionModeback to summary
protected CompressionMode compressionMode
fileNamePatternback to summary
pack-priv FileNamePattern fileNamePattern
fileNamePatternStrback to summary
protected String fileNamePatternStr
parentback to summary
private FileAppender<?> parent
startedback to summary
private boolean started
zipEntryFileNamePatternback to summary
pack-priv FileNamePattern zipEntryFileNamePattern

Constructor Detail

RollingPolicyBaseback to summary
public RollingPolicyBase()

Method Detail

determineCompressionModeback to summary
protected void 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.

getCompressionModeback to summary
public CompressionMode getCompressionMode()

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

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

The compression mode for this policy.

getFileNamePatternback to summary
public String getFileNamePattern()
getParentsRawFilePropertyback to summary
public String getParentsRawFileProperty()
isParentPrudentback to summary
public boolean isParentPrudent()
isStartedback to summary
public boolean isStarted()

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

setFileNamePatternback to summary
public void setFileNamePattern(String fnp)
setParentback to summary
public void setParent(FileAppender<?> appender)

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

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

This method allows RollingPolicy implementations to be aware of their containing appender.

startback to summary
public void start()

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

stopback to summary
public void stop()

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