org.apache.log4j.rolling
Class RollingPolicyBase
java.lang.Object
|
+--org.apache.log4j.spi.ComponentBase
|
+--org.apache.log4j.rolling.RollingPolicyBase
- All Implemented Interfaces:
- Component, OptionHandler, RollingPolicy
- Direct Known Subclasses:
- FixedWindowRollingPolicy, TimeBasedRollingPolicy
- public abstract class RollingPolicyBase
- extends ComponentBase
- implements RollingPolicy
Implements methods common to most, it not all, rolling
policies. Currently such methods are limited to a compression mode
getter/setter.
- Since:
- 1.3
- Author:
- Ceki Gülcü
Method Summary |
abstract void |
activateOptions()
Activate the options that were previously set with calls to option
setters.
|
protected void |
determineCompressionMode()
Given the FileNamePattern string, this method determines the compression
mode depending on last letters of the fileNamePatternStr. |
java.lang.String |
getFileNamePattern()
|
void |
setActiveFileName(java.lang.String afn)
ActiveFileName can be left unset, i.e. as null. |
void |
setFileNamePattern(java.lang.String fnp)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
compressionMode
protected int compressionMode
fileNamePattern
protected FileNamePattern fileNamePattern
fileNamePatternStr
protected java.lang.String fileNamePatternStr
activeFileName
protected java.lang.String activeFileName
RollingPolicyBase
public RollingPolicyBase()
activateOptions
public abstract void activateOptions()
- Description copied from interface:
OptionHandler
- Activate the options that were previously set with calls to option
setters.
This allows to defer activiation of the options until all
options have been set. This is required for components which have
related options that remain ambigous until all are set.
For example, the FileAppender has the File
and Append
options both of
which are ambigous until the other is also set.
- Specified by:
activateOptions
in interface OptionHandler
determineCompressionMode
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.
setFileNamePattern
public void setFileNamePattern(java.lang.String fnp)
getFileNamePattern
public java.lang.String getFileNamePattern()
setActiveFileName
public void setActiveFileName(java.lang.String afn)
- ActiveFileName can be left unset, i.e. as null.
- See Also:
RollingPolicy.getActiveFileName()
Copyright 2000-2005 Apache Software Foundation.