Apache log4cxx  Version 0.13.0
log4cxx::rolling::RollingPolicyBase Class Referenceabstract

Implements methods common to most, it not all, rolling policies. More...

#include <rollingpolicybase.h>

Inheritance diagram for log4cxx::rolling::RollingPolicyBase:
log4cxx::rolling::RollingPolicy log4cxx::helpers::Object log4cxx::spi::OptionHandler log4cxx::helpers::Object log4cxx::rolling::FixedWindowRollingPolicy log4cxx::rolling::TimeBasedRollingPolicy

Public Member Functions

 RollingPolicyBase ()
 
virtual ~RollingPolicyBase ()
 
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...
 
bool getCreateIntermediateDirectories () const
 
void setCreateIntermediateDirectories (bool createIntermediate)
 
- Public Member Functions inherited from log4cxx::rolling::RollingPolicy
virtual ~RollingPolicy ()
 
virtual RolloverDescriptionPtr initialize (const LogString &currentActiveFile, const bool append, log4cxx::helpers::Pool &pool)=0
 Initialize the policy and return any initial actions for rolling file appender. More...
 
virtual RolloverDescriptionPtr rollover (const LogString &currentActiveFile, const bool append, log4cxx::helpers::Pool &pool)=0
 Prepare for a rollover. More...
 
- Public Member Functions inherited from log4cxx::spi::OptionHandler
virtual ~OptionHandler ()
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

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
 

Detailed Description

Implements methods common to most, it not all, rolling policies.

Constructor & Destructor Documentation

◆ RollingPolicyBase()

log4cxx::rolling::RollingPolicyBase::RollingPolicyBase ( )

◆ ~RollingPolicyBase()

virtual log4cxx::rolling::RollingPolicyBase::~RollingPolicyBase ( )
virtual

Member Function Documentation

◆ activateOptions()

virtual void log4cxx::rolling::RollingPolicyBase::activateOptions ( log4cxx::helpers::Pool p)
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 log4cxx::spi::OptionHandler.

Implemented in log4cxx::rolling::TimeBasedRollingPolicy, and log4cxx::rolling::FixedWindowRollingPolicy.

◆ formatFileName()

void log4cxx::rolling::RollingPolicyBase::formatFileName ( log4cxx::helpers::ObjectPtr obj,
LogString buf,
log4cxx::helpers::Pool p 
) const
protected

Format file name.

Parameters
objobject to be evaluted in formatting, may not be null.
bufstring buffer to which formatted file name is appended, may not be null.
pmemory pool.

◆ getCreateIntermediateDirectories()

bool log4cxx::rolling::RollingPolicyBase::getCreateIntermediateDirectories ( ) const

◆ getDatePatternConverter()

log4cxx::pattern::PatternConverterPtr log4cxx::rolling::RollingPolicyBase::getDatePatternConverter ( ) const
protected

◆ getFileNamePattern()

LogString log4cxx::rolling::RollingPolicyBase::getFileNamePattern ( ) const

Get file name pattern.

Returns
file name pattern.

◆ getFormatSpecifiers()

virtual log4cxx::pattern::PatternMap log4cxx::rolling::RollingPolicyBase::getFormatSpecifiers ( ) const
pure virtual

◆ getIntegerPatternConverter()

log4cxx::pattern::PatternConverterPtr log4cxx::rolling::RollingPolicyBase::getIntegerPatternConverter ( ) const
protected

◆ parseFileNamePattern()

void log4cxx::rolling::RollingPolicyBase::parseFileNamePattern ( )
protected

Parse file name pattern.

◆ setCreateIntermediateDirectories()

void log4cxx::rolling::RollingPolicyBase::setCreateIntermediateDirectories ( bool  createIntermediate)

◆ setFileNamePattern()

void log4cxx::rolling::RollingPolicyBase::setFileNamePattern ( const LogString fnp)

Set file name pattern.

Parameters
fnpfile name pattern.

◆ setOption()

virtual void log4cxx::rolling::RollingPolicyBase::setOption ( const LogString option,
const LogString value 
)
virtual

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 log4cxx::spi::OptionHandler.

Reimplemented in log4cxx::rolling::FixedWindowRollingPolicy.


The documentation for this class was generated from the following file: