Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

utils::logging::dolog Class Reference

a dolog object collects log messages and sends it to the logger. More...

#include <log.h>

Inheritance diagram for utils::logging::dolog::

utils::logging::msg string List of all members.

Public Methods

 dolog (const char *file, int line)
 dolog ()
 ~dolog ()

Public Attributes

ostrstream buf

Detailed Description

a dolog object collects log messages and sends it to the logger.

This structure collects parts of the logging entry via << operators. On destruction the contents of the internal buffer is sent as a whole to the main logging object.

Usually you would not use this class directly, use the provided log and dlog macros instead. For example:

 log << "What the hell is going on?" << endl;
 dlog << "This I tell you in debug mode only." << endl;

The log macro expands to the dolog class always, whereas the dlog macro expands to the dolog class only in debug mode (i.e. when NDEBUG is not defined.) Otherwise it expands to a no-op with the same functional interface: the nolog class.

Constructor & Destructor Documentation

utils::logging::dolog::dolog const char *    file,
int    line

utils::logging::dolog::dolog   [inline]


Member Data Documentation

ostrstream utils::logging::dolog::buf

The documentation for this class was generated from the following file:
Generated on Mon Oct 22 17:03:48 2001 for rfc822 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001