![]() |
Belle II Software
release-05-02-19
|
#include <LogConfig.h>
Public Types | |
| enum | ELogLevel { c_Debug, c_Info, c_Result, c_Warning, c_Error, c_Fatal, c_Default } |
| Definition of the supported log levels. More... | |
| enum | ELogInfo { c_Level = 0x01, c_Message = 0x02, c_Module = 0x04, c_Package = 0x08, c_Function = 0x10, c_File = 0x20, c_Line = 0x40, c_Timestamp = 0x80, c_NoVariables = 0x100 } |
| Definition of the supported log message information. More... | |
Public Member Functions | |
| LogConfig (ELogLevel logLevel=c_Default, int debugLevel=c_DefaultDebugLevel) | |
| The LogConfig constructor. More... | |
| void | setLogLevel (ELogLevel logLevel) |
| Configure the log level. More... | |
| ELogLevel | getLogLevel () const |
| Returns the configured log level. More... | |
| void | setDebugLevel (int debugLevel) |
| Configure the debug messaging level. More... | |
| int | getDebugLevel () const |
| Returns the configured debug messaging level. More... | |
| void | setAbortLevel (ELogLevel abortLevel) |
| Configure the abort level. More... | |
| ELogLevel | getAbortLevel () const |
| Returns the configured abort level. More... | |
| void | setLogInfo (ELogLevel logLevel, unsigned int logInfo) |
| Configure the printed log information for the given level. More... | |
| unsigned int | getLogInfo (ELogLevel logLevel) const |
| Returns the configured log information for the given level. More... | |
Static Public Member Functions | |
| static const char * | logLevelToString (ELogLevel logLevelType) |
| Converts a log level type to a string. More... | |
Static Public Attributes | |
| static const int | c_DefaultDebugLevel = 10 |
| Default debug level. | |
Private Attributes | |
| ELogLevel | m_logLevel |
| The log messaging level. More... | |
| int | m_debugLevel |
| The debug messaging level. | |
| ELogLevel | m_abortLevel |
| The log level at which the execution should be stopped. | |
| unsigned int | m_logInfo [c_Default] |
| The kind of printed information per log level. More... | |
The LogConfig class.
This class provides configuration settings for the logging system.
Definition at line 32 of file LogConfig.h.
| enum ELogInfo |
Definition of the supported log message information.
| Enumerator | |
|---|---|
| c_Level | Log level of the message.
|
| c_Message | Log message text.
|
| c_Module | Module in which the message was emitted. |
| c_Package | Package in which the message was emitted. |
| c_Function | Function in which the message was emitted. |
| c_File | Source file in which the message was emitted. |
| c_Line | Line in source file in which the message was emitted. |
| c_Timestamp | Time at which the message was emitted. |
| c_NoVariables | If set don't output any variables that are part of the message. |
Definition at line 46 of file LogConfig.h.
| enum ELogLevel |
Definition of the supported log levels.
In ascending order !
Definition at line 36 of file LogConfig.h.
| LogConfig | ( | LogConfig::ELogLevel | logLevel = c_Default, |
| int | debugLevel = c_DefaultDebugLevel |
||
| ) |
The LogConfig constructor.
| logLevel | The log level. |
| debugLevel | The debug level. |
Definition at line 19 of file LogConfig.cc.
|
inline |
Returns the configured abort level.
Definition at line 115 of file LogConfig.h.
|
inline |
Returns the configured debug messaging level.
Definition at line 101 of file LogConfig.h.
|
inline |
Returns the configured log information for the given level.
Definition at line 130 of file LogConfig.h.
|
inline |
Returns the configured log level.
Definition at line 87 of file LogConfig.h.
|
static |
Converts a log level type to a string.
| logLevelType | The type of the log level. |
Definition at line 44 of file LogConfig.cc.
|
inline |
Configure the abort level.
| abortLevel | The abort log level. |
Definition at line 108 of file LogConfig.h.
|
inline |
Configure the debug messaging level.
| debugLevel | The debug level. |
Definition at line 94 of file LogConfig.h.
|
inline |
Configure the printed log information for the given level.
| logLevel | The log level. |
| logInfo | The log information that should be printed. |
Definition at line 123 of file LogConfig.h.
| void setLogLevel | ( | ELogLevel | logLevel | ) |
Configure the log level.
| logLevel | The log level. |
Definition at line 27 of file LogConfig.cc.
|
private |
The kind of printed information per log level.
(ORed combination of LogConfig::ELogInfo flags).
Definition at line 139 of file LogConfig.h.
|
private |
The log messaging level.
Defined as int for the parameter handling.
Definition at line 135 of file LogConfig.h.