RSC
0.7.17
|
Provides a hierarchical logging system with the possibility to install different backends, which are instances of LoggingSystem. More...
Classes | |
class | ConsoleLogger |
A simple logger that uses cout and cerr for logging. More... | |
class | ConsoleLoggingSystem |
Default logging system using the console for output. More... | |
class | Logger |
Interface for logging adapters that can be used with RSC. More... | |
class | TreeLevelUpdater |
class | LoggerFactory |
Factory to create logger instances. More... | |
class | LoggerProxy |
A proxy to an instance of Logger, which provides the same interface but allows to exchange the underlying logger at runtime. More... | |
class | LoggerTreeNode |
A simple tree representation for loggers. More... | |
class | LoggingSystem |
Represents a logging adapter available to the rsc logging system through the configuration. More... | |
class | OptionBasedConfigurator |
A class which configures the logging tree using configuration subsystem of RSC. More... | |
Typedefs | |
typedef boost::shared_ptr< Logger > | LoggerPtr |
typedef boost::shared_ptr < LoggerProxy > | LoggerProxyPtr |
typedef boost::shared_ptr < LoggerTreeNode > | LoggerTreeNodePtr |
typedef boost::weak_ptr < LoggerTreeNode > | LoggerTreeNodeWeakPtr |
Functions | |
ostream & | operator<< (ostream &stream, const Logger::Level &level) |
rsc::misc::Registry < LoggingSystem > * | loggingSystemRegistry () |
Provides a hierarchical logging system with the possibility to install different backends, which are instances of LoggingSystem.
The hierarchy is completely maintained by LoggerFactory, hence logging systems only need to provide Logger instances which are configured externally according to the hierarchy.
Conceptually, the hierarchy is based on log4cxx/log4j. We have a root logger with empty string as name. All other loggers are (indirect) children of this logger. Hierarchies are separated by a '.' in the logger name. At startup only the root logger has an assigned level. All other loggers inherit this level if not one of their parents also has a level assigned. Generally, the effective level of a logger is the assigned level of the earliest parent of the logger which actually has an assigned level.
To install new LoggingSystem instances, register them in loggingSystemRegistry. The selection of a logging system can be triggered through LoggerFactory::reselectLoggingSystem using a string as a hint.
As the default, a simple cout- / cerr-based LoggingSystem called ConsoleLoggingSystem is provided.
typedef boost::shared_ptr<LoggerProxy> rsc::logging::LoggerProxyPtr |
Definition at line 112 of file LoggerProxy.h.
typedef boost::shared_ptr<Logger> rsc::logging::LoggerPtr |
typedef boost::shared_ptr<LoggerTreeNode> rsc::logging::LoggerTreeNodePtr |
Definition at line 42 of file LoggerTreeNode.h.
typedef boost::weak_ptr<LoggerTreeNode> rsc::logging::LoggerTreeNodeWeakPtr |
Definition at line 44 of file LoggerTreeNode.h.
RSC_EXPORT rsc::misc::Registry< LoggingSystem > * rsc::logging::loggingSystemRegistry | ( | ) |
Definition at line 35 of file LoggingSystem.cpp.
Referenced by rsc::logging::LoggerFactory::reselectLoggingSystem().
RSC_EXPORT std::ostream & rsc::logging::operator<< | ( | ostream & | stream, |
const Logger::Level & | level | ||
) |
Definition at line 95 of file Logger.cpp.