#include <null_logger.h>
Inheritance diagram for null_logger:


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. | |
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.
| null_logger::~null_logger | ( | ) | [virtual] |
Definition at line 20 of file null_logger.cpp.
| null_logger::IMPLEMENT_CLASS_NAME | ( | "null_logger" | ) |
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.
1.5.1