#include <cmnLogger.h>
Collaboration diagram for cmnLogger:

cmnLogger is defined as a singleton, i.e. there is only one instance of cmnLogger. This unique object maintains the data required for the cisst logging system. The desing of the logging system relies on:
To filter the messages, the user can use:
Definition at line 225 of file cmnLogger.h.
| typedef cmnLODMultiplexerStreambuf<char> cmnLogger::StreamBufType |
Type used to define the logging level of detail.
Definition at line 229 of file cmnLogger.h.
| cmnLogger::cmnLogger | ( | const std::string & | defaultLogFileName = "cisstLog.txt" |
) | [protected] |
Constructor. The only constructor must be private in order to ensure that the class register is a singleton.
| static cmnLogger* cmnLogger::Instance | ( | void | ) | [static] |
The log is instantiated as a singleton. To access the unique instantiation, one needs to use this static method. The instantiated log is created at the first call of this method since it is a static variable declared in this method's scope.
| static void cmnLogger::SetLoD | ( | LogLoDType | lod | ) | [inline, static] |
Set the global Level of Detail to filter the log messages.
| lod | The global level of detail used to filter the log. |
Definition at line 310 of file cmnLogger.h.
| static LogLoDType cmnLogger::GetLoD | ( | void | ) | [inline, static] |
Get the global Level of Detail used to filter the log messages.
Definition at line 320 of file cmnLogger.h.
| static StreamBufType* cmnLogger::GetMultiplexer | ( | void | ) | [inline, static] |
Returns the cmnLODMultiplexerStreambuf directly. This allows manipulation of the streambuffer for operations such as adding or deleting channels for the stream..
Definition at line 332 of file cmnLogger.h.
Referenced by cmnNamedMap< _elementType >::GetLogMultiplexer().
| static void cmnLogger::HaltDefaultLog | ( | void | ) | [inline, static] |
Disable the default log file "cisstLog.txt". This method removes the default log from the output list of the multiplexer but doesn't close the default log file.
Definition at line 340 of file cmnLogger.h.
| static void cmnLogger::ResumeDefaultLog | ( | LogLoDType | newLoD = CMN_LOG_LOD_RUN_ERROR |
) | [inline, static] |
Resume the default log file. By default, the log is enabled (this is the default behavior of the cmnLogger constructor) but this can be halted by using HaltDefaultLog(). Using ResumeDefaultLog() allows to resume the log to "cisstLog.txt" without losing previous logs.
Definition at line 350 of file cmnLogger.h.
| static void cmnLogger::AddChannel | ( | std::ostream & | outputStream, | |
| LogLoDType | lod = CMN_LOG_LOD_VERY_VERBOSE | |||
| ) | [inline, static] |
Add an output stream to the logger. The level of detail provided is used to filter the messages, i.e. any message with a level of detail higher than the level associated to the output stream will not be streamed.
Definition at line 358 of file cmnLogger.h.