plumbing::logging_file Class Reference

#include <file.h>

Inheritance diagram for plumbing::logging_file:
plumbing::logging

Public Member Functions

virtual ~logging_file ()
 logging_file (const std::string &filename)

Protected Member Functions

void deliver_message_text (const char *txt)

Private Member Functions

 logging_file ()
 logging_file (const logging_file &)
logging_fileoperator= (const logging_file &)

Private Attributes

std::string filename
void * vfp
time_t since

Detailed Description

The plumbing::logging_file class is used to represent a logging destination which is a file.

The file will be closed and reopened periodically to facilitate logrotate(8) and friends.

Definition at line 35 of file file.h.


Constructor & Destructor Documentation

virtual plumbing::logging_file::~logging_file (  )  [virtual]

The destructor.

plumbing::logging_file::logging_file ( const std::string &  filename  ) 

The constructor.

Parameters:
filename the name of the file which is to receive the logging data.
plumbing::logging_file::logging_file (  )  [private]

The default constructor. Do not use.

plumbing::logging_file::logging_file ( const logging_file  )  [private]

The copy constructor. Do not use.


Member Function Documentation

void plumbing::logging_file::deliver_message_text ( const char *  txt  )  [protected, virtual]

The deliver_message_text method is used to actually deliver a log message to the logging medium. All formatting has been completed, the text requires no further substitutions.

Implements plumbing::logging.

logging_file& plumbing::logging_file::operator= ( const logging_file  )  [private]

The assignment operator. Do not use.


Field Documentation

std::string plumbing::logging_file::filename [private]

The filename isntance variable is sued to rememeber the name of the file which is to receive the logging data.

Definition at line 61 of file file.h.

The since instance variable is used to remember the time we last opened the file. This is used when deciding whether or not to close and reopen the file, to make logrotate(8) easy.

Definition at line 78 of file file.h.

void* plumbing::logging_file::vfp [private]

The vfp instance variable is used to remember the open file. It will be NULL when the file is not open.

Note:
The only reason it's a void* and not a FILE* is to avoid sucking in stdio.h

Definition at line 71 of file file.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 16 14:32:12 2010 for Plumbing by  doxygen 1.6.3