Public Member Functions | Protected Attributes
log4cpp::GenerationalFileAppender Class Reference

#include <GenerationalFileAppender.hh>

Inheritance diagram for log4cpp::GenerationalFileAppender:
Inheritance graph

List of all members.

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.

Detailed Description

A FileAppender that rolls over logfile generations when instructed.

namethe name of the Appender.
fileNamethe 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.)
appendwhether the Appender has to truncate the file or just append to it if it already exists. Defaults to 'true'.
modefile mode to open the logfile with. Defaults to 00644.

Definition at line 28 of file GenerationalFileAppender.hh.

Constructor & Destructor Documentation

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.

Member Function Documentation

Advance to next logfile generation

if could open the next file then all subsequent events are logged to the new logfile ("filename._generation"), otherwise all subsequent events continue to be logged to the currently open logfile
else produce error on stderr?

Definition at line 39 of file GenerationalFileAppender.cpp.

Member Data Documentation

The current generation (initializes to 0)

Definition at line 49 of file GenerationalFileAppender.hh.

Filename given to the constructor, _before_ an extension is applied.

Definition at line 47 of file GenerationalFileAppender.hh.

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

Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Aug 14 2016 03:18:26