Apache log4cxx
Version 0.10.0
|
Implements methods common to most, it not all, rolling policies. More...
Public Member Functions | |
RollingPolicyBase () | |
virtual | ~RollingPolicyBase () |
void | addRef () const |
void | releaseRef () const |
virtual void | activateOptions (log4cxx::helpers::Pool &p)=0 |
Activate the options that were previously set with calls to option setters. More... | |
virtual log4cxx::pattern::PatternMap | getFormatSpecifiers () const =0 |
virtual void | setOption (const LogString &option, const LogString &value) |
Set option to value . More... | |
void | setFileNamePattern (const LogString &fnp) |
Set file name pattern. More... | |
LogString | getFileNamePattern () const |
Get file name pattern. More... | |
Public Member Functions inherited from RollingPolicy | |
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. More... | |
virtual RolloverDescriptionPtr | rollover (const LogString &activeFile, log4cxx::helpers::Pool &p)=0 |
Prepare for a rollover. More... | |
Public Member Functions inherited from OptionHandler | |
virtual | ~OptionHandler () |
Public Member Functions inherited from Object | |
virtual const helpers::Class & | getClass () const |
virtual | ~Object () |
virtual bool | instanceof (const Class &clazz) const =0 |
virtual const void * | cast (const Class &clazz) const =0 |
Public Member Functions inherited from ObjectImpl | |
ObjectImpl () | |
virtual | ~ObjectImpl () |
Protected Member Functions | |
void | parseFileNamePattern () |
Parse file name pattern. More... | |
void | formatFileName (log4cxx::helpers::ObjectPtr &obj, LogString &buf, log4cxx::helpers::Pool &p) const |
Format file name. More... | |
log4cxx::pattern::PatternConverterPtr | getIntegerPatternConverter () const |
log4cxx::pattern::PatternConverterPtr | getDatePatternConverter () const |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
static const helpers::Class & | getStaticClass () |
static const log4cxx::helpers::ClassRegistration & | registerClass () |
Protected Attributes inherited from ObjectImpl | |
unsigned int volatile | ref |
Implements methods common to most, it not all, rolling policies.
|
virtual |
|
pure virtual |
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.
Implements OptionHandler.
Implemented in TimeBasedRollingPolicy, and FixedWindowRollingPolicy.
|
virtual |
Reimplemented from ObjectImpl.
Reimplemented in TimeBasedRollingPolicy.
|
protected |
Format file name.
obj | object to be evaluted in formatting, may not be null. |
buf | string buffer to which formatted file name is appended, may not be null. |
p | memory pool. |
|
protected |
LogString getFileNamePattern | ( | ) | const |
Get file name pattern.
|
pure virtual |
Implemented in TimeBasedRollingPolicy, and FixedWindowRollingPolicy.
|
protected |
|
protected |
Parse file name pattern.
|
virtual |
Reimplemented from ObjectImpl.
Reimplemented in TimeBasedRollingPolicy.
void setFileNamePattern | ( | const LogString & | fnp | ) |
Set file name pattern.
fnp | file name pattern. |
Set option
to value
.
The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called.
Implements OptionHandler.
Reimplemented in FixedWindowRollingPolicy.