Manages the logging framework. More...
#include <LoggingManager.h>
Manages the logging framework.
The logging framework can be configured through a call to Initialize(). It will then read its configuration via icl_core_config. See http://www.mca2.org/wiki/index.php/ProgMan:Logging for the details.
Definition at line 61 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogOutputStreamConfig> icl_core::logging::LoggingManager::LogOutputStreamConfigMap [private] |
Definition at line 238 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogOutputStreamFactory> icl_core::logging::LoggingManager::LogOutputStreamFactoryMap [private] |
Definition at line 265 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogOutputStream*> icl_core::logging::LoggingManager::LogOutputStreamMap [private] |
Definition at line 267 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogStreamConfig> icl_core::logging::LoggingManager::LogStreamConfigMap [private] |
Definition at line 248 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogStreamFactory> icl_core::logging::LoggingManager::LogStreamFactoryMap [private] |
Definition at line 266 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogStream*> icl_core::logging::LoggingManager::LogStreamMap [private] |
Definition at line 264 of file LoggingManager.h.
typedef icl_core::List<icl_core::String> icl_core::logging::LoggingManager::StringList [private] |
Definition at line 222 of file LoggingManager.h.
icl_core::logging::LoggingManager::LoggingManager | ( | ) | [private] |
Definition at line 329 of file LoggingManager.cpp.
icl_core::logging::LoggingManager::~LoggingManager | ( | ) | [private] |
Definition at line 345 of file LoggingManager.cpp.
icl_core::logging::LoggingManager::LoggingManager | ( | const LoggingManager & | ) | [private] |
void icl_core::logging::LoggingManager::assertInitialized | ( | ) | const |
Check if the logging manager has already been initialized. Aborts the program if not.
Definition at line 278 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::changeLogFormat | ( | const icl_core::String & | name, |
const char * | format = "~T ~S(~L)~ C~(O~::D: ~E" |
||
) |
Changes the log output format of the log output streams. See LogOutputStream::changeLogFormat for format definition
Definition at line 381 of file LoggingManager.cpp.
Configures log streams and log output streams.
This function is only useful if log streams are created dynamically after the logging manager has been initialized.
Definition at line 129 of file LoggingManager.cpp.
Initializes the logging manager.
Remark: It is preferred to use the convenience functions icl_core::logging::initialize(), icl_core::logging::initialize(int&, char *[], bool) or icl_core::logging::initialize(int&, char *[], icl_core::config::Getopt::CommandLineCleaning, icl_core::config::Getopt::ParameterRegistrationCheck) instead of directly calling this method.
Definition at line 31 of file LoggingManager.cpp.
bool icl_core::logging::LoggingManager::initialized | ( | ) | const [inline] |
Check if the logging manager has already been initialized.
Definition at line 91 of file LoggingManager.h.
static LoggingManager& icl_core::logging::LoggingManager::instance | ( | ) | [inline, static] |
Definition at line 64 of file LoggingManager.h.
LoggingManager& icl_core::logging::LoggingManager::operator= | ( | const LoggingManager & | ) | [private] |
void icl_core::logging::LoggingManager::printConfiguration | ( | ) | const |
Prints the configuration of log streams and log output streams.
Remark: This is mainly for debugging purposes!
Definition at line 350 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::registerLogOutputStream | ( | const icl_core::String & | name, |
LogOutputStreamFactory | factory | ||
) |
Registers a log output stream factory with the manager.
Definition at line 286 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::registerLogStream | ( | const icl_core::String & | name, |
LogStreamFactory | factory | ||
) |
Registers a log stream factory with the manager.
Definition at line 306 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::registerLogStream | ( | LogStream * | log_stream | ) |
Registers a log stream with the manager.
Definition at line 311 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::removeLogOutputStream | ( | LogOutputStream * | log_output_stream, |
bool | remove_from_list = true |
||
) |
Removes a log output stream from the logging manager.
Definition at line 291 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::removeLogStream | ( | const icl_core::String & | log_stream_name | ) |
Removes a log stream from the logging manager.
Definition at line 321 of file LoggingManager.cpp.
Shuts down the logging framework. Any log messages that are pending in log output streams are written out. The log output stream threads are then stopped so that no further log messages are processed.
Definition at line 393 of file LoggingManager.cpp.
Definition at line 273 of file LoggingManager.h.
bool icl_core::logging::LoggingManager::m_initialized [private] |
Definition at line 258 of file LoggingManager.h.
LogOutputStreamFactoryMap icl_core::logging::LoggingManager::m_log_output_stream_factories [private] |
Definition at line 269 of file LoggingManager.h.
Definition at line 271 of file LoggingManager.h.
Definition at line 262 of file LoggingManager.h.
Definition at line 270 of file LoggingManager.h.
Definition at line 268 of file LoggingManager.h.
Definition at line 261 of file LoggingManager.h.
bool icl_core::logging::LoggingManager::m_shutdown_running [private] |
Definition at line 259 of file LoggingManager.h.