#include <Logger.h>
Public Member Functions | |
void VERVE_CALL | setStream (const std::string &name, std::ostream *stream, const std::string &prefix="", char mark='\0') |
std::ostream &VERVE_CALL | stream (const std::string &name) |
Static Public Member Functions | |
static Logger &VERVE_CALL | instance () |
Private Member Functions | |
Logger () | |
~Logger () | |
Private Attributes | |
std::map< std::string, Stream > | mStreams |
Classes | |
struct | Stream |
A simple output stream structure. More... |
Calls to this class should replace all cout << statements in the form: Logger::stream("myStreamName") << ... where myStreamName was registered as a cout stream or file stream using the setStream function. We use a singleton here so we never have to initialize the Logger explicitly.
Definition at line 50 of file Logger.h.
|
|
|
|
|
Returns a reference to the singleton.
|
|
Register a new stream for later use.
Definition at line 61 of file Logger.h. References verve::Logger::Stream::mark, mStreams, verve::Logger::Stream::prefix, verve::Logger::Stream::silent, and verve::Logger::Stream::stream. |
|
Returns the named stream.
Definition at line 74 of file Logger.h. References verve::Logger::Stream::mark, mStreams, verve::Logger::Stream::prefix, and verve::Logger::Stream::stream. |
|
Internal map of named output streams.
Definition at line 115 of file Logger.h. Referenced by setStream(), and stream(). |