log4cplus  1.1.0
Public Member Functions | Protected Member Functions | Protected Attributes
log4cplus::RollingFileAppender Class Reference

RollingFileAppender extends FileAppender to backup the log files when they reach a certain size. More...

#include <fileappender.h>

Inheritance diagram for log4cplus::RollingFileAppender:
[legend]
Collaboration diagram for log4cplus::RollingFileAppender:
[legend]

List of all members.

Public Member Functions

 RollingFileAppender (const log4cplus::tstring &filename, long maxFileSize=10 *1024 *1024, int maxBackupIndex=1, bool immediateFlush=true)
 RollingFileAppender (const log4cplus::helpers::Properties &properties)
virtual ~RollingFileAppender ()

Protected Member Functions

virtual void append (const spi::InternalLoggingEvent &event)
 Subclasses of Appender should implement this method to perform actual logging.
void rollover (bool alreadyLocked=false)

Protected Attributes

long maxFileSize
int maxBackupIndex

Detailed Description

RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.

Properties

Properties additional to FileAppender's properties:

MaxFileSize

This property specifies maximal size of output file. The value is in bytes. It is possible to use MB and KB suffixes to specify the value in megabytes or kilobytes instead.

MaxBackupIndex
This property limits the number of backup output files; e.g. how many log.1, log.2 etc. files will be kept.

Definition at line 198 of file fileappender.h.


Constructor & Destructor Documentation

log4cplus::RollingFileAppender::RollingFileAppender ( const log4cplus::tstring filename,
long  maxFileSize = 10 *1024 *1024,
int  maxBackupIndex = 1,
bool  immediateFlush = true 
)

Member Function Documentation

virtual void log4cplus::RollingFileAppender::append ( const spi::InternalLoggingEvent event) [protected, virtual]

Subclasses of Appender should implement this method to perform actual logging.

See also:
doAppend method.

Reimplemented from log4cplus::FileAppender.

void log4cplus::RollingFileAppender::rollover ( bool  alreadyLocked = false) [protected]

Member Data Documentation

Definition at line 216 of file fileappender.h.

Definition at line 215 of file fileappender.h.


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