log4cplus
1.1.0
|
RollingFileAppender extends FileAppender to backup the log files when they reach a certain size. More...
#include <fileappender.h>
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 |
RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.
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
log.1
, log.2
etc. files will be kept. Definition at line 198 of file fileappender.h.
log4cplus::RollingFileAppender::RollingFileAppender | ( | const log4cplus::tstring & | filename, |
long | maxFileSize = 10 *1024 *1024 , |
||
int | maxBackupIndex = 1 , |
||
bool | immediateFlush = true |
||
) |
log4cplus::RollingFileAppender::RollingFileAppender | ( | const log4cplus::helpers::Properties & | properties | ) |
virtual log4cplus::RollingFileAppender::~RollingFileAppender | ( | ) | [virtual] |
virtual void log4cplus::RollingFileAppender::append | ( | const spi::InternalLoggingEvent & | event | ) | [protected, virtual] |
Subclasses of Appender
should implement this method to perform actual logging.
Reimplemented from log4cplus::FileAppender.
void log4cplus::RollingFileAppender::rollover | ( | bool | alreadyLocked = false | ) | [protected] |
int log4cplus::RollingFileAppender::maxBackupIndex [protected] |
Definition at line 216 of file fileappender.h.
long log4cplus::RollingFileAppender::maxFileSize [protected] |
Definition at line 215 of file fileappender.h.