#include <wxlogger.h>
|
| enum class | eLevels {
not_set = 0
, debug = 10
, info = 20
, warning = 30
,
error = 40
, critical = 50
, disabled = 1000
} |
| |
| typedef std::map< eLevels, std::string, std::less< eLevels > > | LevelMap_t |
| |
| typedef std::map< std::string, eLevels, std::less< std::string > > | StringMap_t |
| |
| typedef std::map< std::string, WxLogger *, std::less< std::string > > | LoggerMap_t |
| |
| typedef std::pair< std::string, WxLogger * > | LoggerPair_t |
| |
|
| static WxLogger * | get (const std::string &nm) |
| | Returns a logger with a given name.
|
| |
| static WxLogger * | getSafe (const std::string &nm) |
| | Returns a logger with a given name.
|
| |
| static void | cleanUp () |
| | Delete all loggers registered in the system.
|
| |
◆ LevelMap_t
◆ StringMap_t
◆ eLevels
| Enumerator |
|---|
| not_set | |
| debug | |
| info | |
| warning | |
| error | |
| critical | |
| disabled | |
◆ WxLogger()
| WxLogger::WxLogger |
( |
const std::string & |
name | ) |
|
Creates a new logger with given name.
The verbosity is set NOTSET. However, by default no handlers are installed so no messages will be logged.
◆ ~WxLogger()
| virtual WxLogger::~WxLogger |
( |
| ) |
|
|
virtual |
Delete logger and all log record handlers.
◆ addHandler()
Add a new handler to the logger.
- Parameters
-
| handler | Instance of class WxLogRecordHandler. Note that the handler is not owned by the logger and hence is never deleted. |
◆ critical()
| void WxLogger::critical |
( |
const std::string & |
msg | ) |
const |
◆ debug()
| void WxLogger::debug |
( |
const std::string & |
msg | ) |
const |
◆ disable()
| void WxLogger::disable |
( |
| ) |
|
Disables all logging to this logger.
Logging at the original level can be resumed by calling the 'enable' method.
◆ enable()
| void WxLogger::enable |
( |
| ) |
|
Re-enables logging to this logger.
The verbosity level is set to the one prior to the disable call.
◆ error()
| void WxLogger::error |
( |
const std::string & |
msg | ) |
const |
◆ getCriticalStream()
Return stream to log critical messages.
◆ getDebugStream()
Return stream to log debug messages.
◆ getErrorStream()
Return stream to log error messages.
◆ getInfoStream()
Return stream to log info messages.
◆ getLevel()
| eLevels WxLogger::getLevel |
( |
| ) |
const |
◆ getLevelStr()
| std::string WxLogger::getLevelStr |
( |
| ) |
|
Get verbosity level as a string.
◆ getWarningStream()
Return stream to log warning messages.
◆ info()
| void WxLogger::info |
( |
const std::string & |
msg | ) |
const |
◆ log()
| void WxLogger::log |
( |
const std::string & |
msg, |
|
|
eLevels |
withLevel |
|
) |
| const |
◆ setLevel() [1/2]
| void WxLogger::setLevel |
( |
const std::string & |
level | ) |
|
Set verbosity level passing a string.
◆ setLevel() [2/2]
| void WxLogger::setLevel |
( |
enum eLevels |
level | ) |
|
◆ warning()
| void WxLogger::warning |
( |
const std::string & |
msg | ) |
const |
◆ WxLoggerBase< WxLogger >
The documentation for this class was generated from the following file: