A class for logging messages. More...
#include <util.h>
Public Member Functions | |
| logger (int blanks=0) | |
| Constructor. | |
| std::ostream & | operator() (void) |
| Return an output stream for caller to build a message. | |
| ~logger () | |
| Destructor. | |
Protected Attributes | |
| std::ostringstream | mybuffer |
| The message is stored in this buffer. | |
A class for logging messages.
The caller writes message to a std::ostream returned by the function buffer as if to std::cout. Note that messages are stored in this buffer and written out in the destructor of this class. There is a macro LOGGER that can simplify some of the routine stuff. Use function ibis::util::setLogFile to explicit name of the log file or use RC file entry logfile to specify a file name. By default all messages are dump to stdout.
|
| |