#include <GenerationalFileAppender.hh>
Public Member Functions | |
virtual void | advanceGeneration () |
GenerationalFileAppender (const std::string &name, const std::string &fileName, bool append=true, mode_t mode=00644) | |
Open "filename.0" and set _generation=0. | |
Protected Attributes | |
unsigned int | _generation |
The current generation (initializes to 0) | |
std::string | _originalFileName |
Filename given to the constructor, _before_ an extension is applied. |
A FileAppender that rolls over logfile generations when instructed.
name | the name of the Appender. |
fileName | the name of the file to which the Appender has to log (the actual filename will be "filename" for the first logfile, and "filename.0" after rollOver(), then "filename.1", etc.) |
append | whether the Appender has to truncate the file or just append to it if it already exists. Defaults to 'true'. |
mode | file mode to open the logfile with. Defaults to 00644. |
Definition at line 28 of file GenerationalFileAppender.hh.
log4cpp::GenerationalFileAppender::GenerationalFileAppender | ( | const std::string & | name, |
const std::string & | fileName, | ||
bool | append = true , |
||
mode_t | mode = 00644 |
||
) |
Open "filename.0" and set _generation=0.
Definition at line 30 of file GenerationalFileAppender.cpp.
void log4cpp::GenerationalFileAppender::advanceGeneration | ( | ) | [virtual] |
Advance to next logfile generation
Definition at line 39 of file GenerationalFileAppender.cpp.
unsigned int log4cpp::GenerationalFileAppender::_generation [protected] |
The current generation (initializes to 0)
Definition at line 49 of file GenerationalFileAppender.hh.
std::string log4cpp::GenerationalFileAppender::_originalFileName [protected] |
Filename given to the constructor, _before_ an extension is applied.
Definition at line 47 of file GenerationalFileAppender.hh.