Provides a logger that accepts and dispatches logging messages. More...
#include <cadex/Utilities/Logger.hxx>
Classes | |
| class | Sentry |
| Helper class to unregister the handler from the logger upon own destruction. More... | |
Public Member Functions | |
| void | SetLevel (const LoggerLevel theLevel) |
| Sets message severity level. | |
| LoggerLevel | Level () const |
| Returns a message severity level. | |
| bool | CanAccept (const LoggerLevel theLevel) const |
| Returns true if the logger accepts a message of the level theLevel. | |
| void | ForcedLog (const LoggerLevel theLevel, const UTF16String &theMessage, const internal::LoggerLocationInfo &theLocation) |
| Logs a message with respective level and location information. | |
| void | Register (const std::shared_ptr< LoggerHandler > &theHandler, const LoggerLevel theMinLevel=LoggerLevel::Trace, const LoggerLevel theMaxLevel=LoggerLevel::Fatal) |
| Adds a handler to the logger. | |
| void | Unregister (const std::shared_ptr< LoggerHandler > &theHandler) |
| Removes a handler from registered list of handlers. | |
Static Public Member Functions | |
| static Logger & | Instance () |
| Returns a global logger. | |
Provides a logger that accepts and dispatches logging messages.
The logger is available via a singleton returned by Instance(). The message threshold level should be set with SetLevel(). Messages sent with lower level will be ignored.
Handlers must be registered/unregistered with Register()/Unregister(). The handlers process accepted messages in the order of their registration.
For details refer to Logging Support.