![]() |
Belle II Software
light-2303-iriomote
|
#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... | |
| enum | ELogRealm { c_None , c_Online , c_Production } |
| Definition of the supported execution realms. 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 const char * | logRealmToString (ELogRealm realm) |
| Converts a log realm 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 22 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 36 of file LogConfig.h.
| enum ELogLevel |
Definition of the supported log levels.
In ascending order !
Definition at line 26 of file LogConfig.h.
| enum ELogRealm |
Definition of the supported execution realms.
| Enumerator | |
|---|---|
| c_None | No specific realm. |
| c_Online | Online data taking. |
| c_Production | Data production jobs. |
Definition at line 48 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 17 of file LogConfig.cc.
|
inline |
Returns the configured abort level.
Definition at line 119 of file LogConfig.h.
|
inline |
Returns the configured debug messaging level.
Definition at line 105 of file LogConfig.h.
|
inline |
Returns the configured log information for the given level.
Definition at line 134 of file LogConfig.h.
|
inline |
Returns the configured log level.
Definition at line 91 of file LogConfig.h.
|
static |
Converts a log level type to a string.
| logLevelType | The type of the log level. |
Definition at line 42 of file LogConfig.cc.
|
static |
Converts a log realm type to a string.
| realm | The log realm. |
Definition at line 49 of file LogConfig.cc.
|
inline |
Configure the abort level.
| abortLevel | The abort log level. |
Definition at line 112 of file LogConfig.h.
|
inline |
Configure the debug messaging level.
| debugLevel | The debug level. |
Definition at line 98 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 127 of file LogConfig.h.
| void setLogLevel | ( | ELogLevel | logLevel | ) |
Configure the log level.
| logLevel | The log level. |
Definition at line 25 of file LogConfig.cc.
|
private |
The kind of printed information per log level.
(ORed combination of LogConfig::ELogInfo flags).
Definition at line 143 of file LogConfig.h.
|
private |
The log messaging level.
Defined as int for the parameter handling.
Definition at line 139 of file LogConfig.h.