RollingPolicy
is responsible for performing the rolling over of the active log file.
More...
Inherits log4cxx::spi::OptionHandler.
Inherited by RollingPolicyBase [virtual]
.
Public Member Functions | |
virtual | ~RollingPolicy () |
virtual RolloverDescriptionPtr | initialize (const LogString &file, const bool append, log4cxx::helpers::Pool &p)=0 |
Initialize the policy and return any initial actions for rolling file appender. | |
virtual RolloverDescriptionPtr | rollover (const LogString &activeFile, log4cxx::helpers::Pool &p)=0 |
Prepare for a rollover. |
RollingPolicy
is responsible for performing the rolling over of the active log file.
The RollingPolicy
is also responsible for providing the active log file, that is the live file where logging output will be directed.
virtual ~RollingPolicy | ( | ) | [inline, virtual] |
virtual RolloverDescriptionPtr initialize | ( | const LogString & | file, | |
const bool | append, | |||
log4cxx::helpers::Pool & | p | |||
) | [pure virtual] |
Initialize the policy and return any initial actions for rolling file appender.
file | current value of RollingFileAppender.getFile(). | |
append | current value of RollingFileAppender.getAppend(). | |
p | pool for memory allocations during call. |
SecurityException | if denied access to log files. |
Implemented in FixedWindowRollingPolicy, and TimeBasedRollingPolicy.
virtual RolloverDescriptionPtr rollover | ( | const LogString & | activeFile, | |
log4cxx::helpers::Pool & | p | |||
) | [pure virtual] |
Prepare for a rollover.
This method is called prior to closing the active log file, performs any necessary preliminary actions and describes actions needed after close of current log file.
activeFile | file name for current active log file. | |
p | pool for memory allocations during call. |
SecurityException | if denied access to log files. |
Implemented in FixedWindowRollingPolicy, and TimeBasedRollingPolicy.