null_logger Class Reference

a trash can for logging; throws away all entries. More...

#include <null_logger.h>

Inheritance diagram for null_logger:

Inheritance graph
[legend]
Collaboration diagram for null_logger:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~null_logger ()
 IMPLEMENT_CLASS_NAME ("null_logger")
virtual outcome log (const istring &info, int filter=ALWAYS_PRINT)
 writes the information in "info" to the log using the "filter" value.

Detailed Description

a trash can for logging; throws away all entries.

Provides a log_base object that throws away all of the strings that are logged to it. This is useful when an interface requires a log_base object but one does not wish to generate an output file. This object is similar to /dev/null in Unix and nul: in Win32.

Definition at line 31 of file null_logger.h.


Constructor & Destructor Documentation

null_logger::~null_logger (  )  [virtual]

Definition at line 20 of file null_logger.cpp.


Member Function Documentation

null_logger::IMPLEMENT_CLASS_NAME ( "null_logger"   ) 

virtual outcome null_logger::log ( const istring info,
int  filter = ALWAYS_PRINT 
) [virtual]

writes the information in "info" to the log using the "filter" value.

the "filter" value must be checked to see if it is in the current set of allowed filters (using member()). this function _must_ be provided by derived classes and it _must_ check the filter before printing if it wants to be in compliance with log_base protocols. it also must implement the line_ending appropriately. the return value will often be a member of the common outcomes, but derived classes may see fit to return other things. note that an object derived from log_base should be thread-safe and protect its own member attributes through synchronization.

Implements log_base.


The documentation for this class was generated from the following files:
Generated on Sat Aug 30 04:33:22 2008 for HOOPLE Libraries by  doxygen 1.5.1