Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
icl_core::logging::LoggingManager Class Reference

Manages the logging framework. More...

#include <LoggingManager.h>

List of all members.

Classes

struct  LogOutputStreamConfig
 Configuration of a LogOutputStream. More...
struct  LogStreamConfig
 Configuration of a LogStream. More...

Public Member Functions

void assertInitialized () const
void changeLogFormat (const icl_core::String &name, const char *format="~T ~S(~L)~ C~(O~::D: ~E")
void configure ()
void initialize ()
bool initialized () const
void printConfiguration () const
void registerLogOutputStream (const icl_core::String &name, LogOutputStreamFactory factory)
void registerLogStream (const icl_core::String &name, LogStreamFactory factory)
void registerLogStream (LogStream *log_stream)
void removeLogOutputStream (LogOutputStream *log_output_stream, bool remove_from_list=true)
void removeLogStream (const icl_core::String &log_stream_name)
void setLogLevel (icl_core::logging::LogLevel log_level)
 Set the log level globally for all existing streams.
void shutdown ()

Static Public Member Functions

static LoggingManagerinstance ()

Private Types

typedef icl_core::Map
< icl_core::String,
LogOutputStreamConfig
LogOutputStreamConfigMap
typedef icl_core::Map
< icl_core::String,
LogOutputStreamFactory
LogOutputStreamFactoryMap
typedef icl_core::Map
< icl_core::String,
LogOutputStream * > 
LogOutputStreamMap
typedef icl_core::Map
< icl_core::String,
LogStreamConfig
LogStreamConfigMap
typedef icl_core::Map
< icl_core::String,
LogStreamFactory
LogStreamFactoryMap
typedef icl_core::Map
< icl_core::String, LogStream * > 
LogStreamMap
typedef icl_core::List
< icl_core::String
StringList

Private Member Functions

 LoggingManager ()
 LoggingManager (const LoggingManager &)
LoggingManageroperator= (const LoggingManager &)
 ~LoggingManager ()

Private Attributes

LogOutputStreamm_default_log_output
bool m_initialized
LogOutputStreamFactoryMap m_log_output_stream_factories
LogOutputStreamMap m_log_output_streams
LogStreamConfigMap m_log_stream_config
LogStreamFactoryMap m_log_stream_factories
LogStreamMap m_log_streams
LogOutputStreamConfigMap m_output_stream_config
bool m_shutdown_running

Detailed Description

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.


Member Typedef Documentation

Definition at line 241 of file LoggingManager.h.

Definition at line 268 of file LoggingManager.h.

Definition at line 270 of file LoggingManager.h.

Definition at line 251 of file LoggingManager.h.

Definition at line 269 of file LoggingManager.h.

Definition at line 267 of file LoggingManager.h.

Definition at line 225 of file LoggingManager.h.


Constructor & Destructor Documentation

Definition at line 356 of file LoggingManager.cpp.

Definition at line 372 of file LoggingManager.cpp.


Member Function Documentation

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.

Check if the logging manager has already been initialized.

Definition at line 91 of file LoggingManager.h.

Definition at line 64 of file LoggingManager.h.

LoggingManager& icl_core::logging::LoggingManager::operator= ( const LoggingManager ) [private]

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.

Registers a log output stream factory with the manager.

Definition at line 313 of file LoggingManager.cpp.

Registers a log stream factory with the manager.

Definition at line 333 of file LoggingManager.cpp.

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.

Removes a log stream from the logging manager.

Definition at line 348 of file LoggingManager.cpp.

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.


Member Data Documentation

Definition at line 276 of file LoggingManager.h.

Definition at line 261 of file LoggingManager.h.

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.

Definition at line 262 of file LoggingManager.h.


The documentation for this class was generated from the following files:


fzi_icl_core
Author(s):
autogenerated on Thu Jun 6 2019 20:22:26