#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. More... | |
Public Member Functions inherited from log4cpp::FileAppender | |
virtual void | close () |
FileAppender (const std::string &name, const std::string &fileName, bool append=true, mode_t mode=00644) | |
FileAppender (const std::string &name, int fd) | |
virtual bool | getAppend () const |
virtual mode_t | getMode () const |
virtual bool | reopen () |
virtual void | setAppend (bool append) |
virtual void | setMode (mode_t mode) |
virtual | ~FileAppender () |
Public Member Functions inherited from log4cpp::LayoutAppender | |
LayoutAppender (const std::string &name) | |
virtual bool | requiresLayout () const |
virtual void | setLayout (Layout *layout=NULL) |
virtual | ~LayoutAppender () |
Public Member Functions inherited from log4cpp::AppenderSkeleton | |
virtual void | doAppend (const LoggingEvent &event) |
virtual Filter * | getFilter () |
virtual Priority::Value | getThreshold () |
virtual void | setFilter (Filter *filter) |
virtual void | setThreshold (Priority::Value priority) |
virtual | ~AppenderSkeleton () |
Public Member Functions inherited from log4cpp::Appender | |
const std::string & | getName () const |
virtual | ~Appender () |
Protected Attributes | |
unsigned int | _generation |
The current generation (initializes to 0) More... | |
std::string | _originalFileName |
Filename given to the constructor, before an extension is applied. More... | |
Protected Attributes inherited from log4cpp::FileAppender | |
int | _fd |
const std::string | _fileName |
int | _flags |
mode_t | _mode |
Additional Inherited Members | |
Public Types inherited from log4cpp::LayoutAppender | |
typedef BasicLayout | DefaultLayoutType |
Static Public Member Functions inherited from log4cpp::Appender | |
static void | closeAll () |
static Appender * | getAppender (const std::string &name) |
static bool | reopenAll () |
Protected Member Functions inherited from log4cpp::FileAppender | |
virtual void | _append (const LoggingEvent &event) |
Protected Member Functions inherited from log4cpp::LayoutAppender | |
Layout & | _getLayout () |
Protected Member Functions inherited from log4cpp::AppenderSkeleton | |
AppenderSkeleton (const std::string &name) | |
Protected Member Functions inherited from log4cpp::Appender | |
Appender (const std::string &name) | |
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.
|
virtual |
Advance to next logfile generation
Definition at line 39 of file GenerationalFileAppender.cpp.
|
protected |
The current generation (initializes to 0)
Definition at line 49 of file GenerationalFileAppender.hh.
|
protected |
Filename given to the constructor, before an extension is applied.
Definition at line 47 of file GenerationalFileAppender.hh.