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 241 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogOutputStreamFactory> icl_core::logging::LoggingManager::LogOutputStreamFactoryMap [private] |
Definition at line 268 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogOutputStream*> icl_core::logging::LoggingManager::LogOutputStreamMap [private] |
Definition at line 270 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogStreamConfig> icl_core::logging::LoggingManager::LogStreamConfigMap [private] |
Definition at line 251 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogStreamFactory> icl_core::logging::LoggingManager::LogStreamFactoryMap [private] |
Definition at line 269 of file LoggingManager.h.
typedef icl_core::Map<icl_core::String, LogStream*> icl_core::logging::LoggingManager::LogStreamMap [private] |
Definition at line 267 of file LoggingManager.h.
typedef icl_core::List<icl_core::String> icl_core::logging::LoggingManager::StringList [private] |
Definition at line 225 of file LoggingManager.h.
icl_core::logging::LoggingManager::LoggingManager | ( | ) | [private] |
Definition at line 356 of file LoggingManager.cpp.
icl_core::logging::LoggingManager::~LoggingManager | ( | ) | [private] |
Definition at line 372 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 305 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 408 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 142 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 44 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 377 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 313 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 333 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::registerLogStream | ( | LogStream * | log_stream | ) |
Registers a log stream with the manager.
Definition at line 338 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 318 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 348 of file LoggingManager.cpp.
void icl_core::logging::LoggingManager::setLogLevel | ( | icl_core::logging::LogLevel | log_level | ) |
Set the log level globally for all existing streams.
Definition at line 291 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 420 of file LoggingManager.cpp.
Definition at line 276 of file LoggingManager.h.
bool icl_core::logging::LoggingManager::m_initialized [private] |
Definition at line 261 of file LoggingManager.h.
LogOutputStreamFactoryMap icl_core::logging::LoggingManager::m_log_output_stream_factories [private] |
Definition at line 272 of file LoggingManager.h.
Definition at line 274 of file LoggingManager.h.
Definition at line 265 of file LoggingManager.h.
Definition at line 273 of file LoggingManager.h.
Definition at line 271 of file LoggingManager.h.
Definition at line 264 of file LoggingManager.h.
bool icl_core::logging::LoggingManager::m_shutdown_running [private] |
Definition at line 262 of file LoggingManager.h.