LogFile Class Reference
[Connector implementation classes and data]

A write-only connection to a log file. More...

#include <logfile.h>

Inheritance diagram for LogFile:

Inheritance graph
[legend]
Collaboration diagram for LogFile:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LogFile (string, mode_t=0640)
 ~LogFile ()
string class_name (void)
std::string get_id (void) const
 Instance identification string (abstract virtual).

Private Member Functions

void connect (void)
void disconnect (void)
 Write a message to the log file, then close it.

Private Attributes

string path
mode_t mode


Detailed Description

A write-only connection to a log file.

Used to log all incoming data from a connected server to a file for later review.

Consider renaming to FileConnector, since it could be used for files other than logfiles. But then, we log things when we open and close the file, so perhaps it really is just for logfiles.

Definition at line 62 of file logfile.h.


Constructor & Destructor Documentation

LogFile::LogFile ( string  fn,
mode_t  m = 0640 
)

Definition at line 50 of file logfile.cc.

References connect().

Here is the call graph for this function:

LogFile::~LogFile (  )  [inline]

Definition at line 65 of file logfile.h.

References disconnect().

Here is the call graph for this function:


Member Function Documentation

string LogFile::class_name ( void   )  [inline]

Definition at line 67 of file logfile.h.

string LogFile::get_id ( void   )  const [virtual]

Instance identification string (abstract virtual).

Reimplemented from FDConnector.

Definition at line 59 of file logfile.cc.

References path.

void LogFile::connect ( void   )  [private]

Definition at line 71 of file logfile.cc.

References __progname, FDConnector::connect(), FDConnector::fd, mode, path, and FDConnector::write().

Referenced by LogFile().

Here is the call graph for this function:

Here is the caller graph for this function:

void LogFile::disconnect ( void   )  [private, virtual]

Write a message to the log file, then close it.

Reimplemented from FDConnector.

Definition at line 110 of file logfile.cc.

References FDConnector::connected(), and FDConnector::write().

Referenced by ~LogFile().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

string LogFile::path [private]

Definition at line 74 of file logfile.h.

Referenced by connect(), and get_id().

mode_t LogFile::mode [private]

Definition at line 75 of file logfile.h.

Referenced by connect().


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

Generated on Tue May 13 11:32:47 2008 for consmgr by  doxygen 1.5.5