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 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 238 of file LoggingManager.h.

Definition at line 265 of file LoggingManager.h.

Definition at line 267 of file LoggingManager.h.

Definition at line 248 of file LoggingManager.h.

Definition at line 266 of file LoggingManager.h.

Definition at line 264 of file LoggingManager.h.

Definition at line 222 of file LoggingManager.h.


Constructor & Destructor Documentation

Definition at line 329 of file LoggingManager.cpp.

Definition at line 345 of file LoggingManager.cpp.


Member Function Documentation

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.

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 350 of file LoggingManager.cpp.

Registers a log output stream factory with the manager.

Definition at line 286 of file LoggingManager.cpp.

Registers a log stream factory with the manager.

Definition at line 306 of file LoggingManager.cpp.

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.

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.


Member Data Documentation

Definition at line 273 of file LoggingManager.h.

Definition at line 258 of file LoggingManager.h.

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.

Definition at line 259 of file LoggingManager.h.


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


schunk_svh_driver
Author(s): Georg Heppner
autogenerated on Fri Aug 28 2015 12:59:20