#include <boost/preprocessor/comparison/less_equal.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/facilities/expand.hpp>
Namespaces | |
kanzi | |
Macros | |
#define | KZ_LOG_CREATE_LEVEL(value, name) |
Creates new log level. More... | |
#define | KZ_LOG_GET_LEVEL_VALUE(level) |
To get log level value, use KZ_LOG_GET_LEVEL_VALUE. More... | |
#define | KZ_LOG_GET_LEVEL_NAME(level) |
To get the log level name, use KZ_LOG_GET_LEVEL_NAME. More... | |
#define | KZ_LOG_IS_LEVEL_ENABLED(level) |
To check if the log level is enabled, use KZ_LOG_IS_LEVEL_ENABLED. More... | |
#define | KZ_LOG_LEVEL_ERROR |
The error log level. More... | |
#define | KZ_LOG_LEVEL_WARNING |
The warning log level. More... | |
#define | KZ_LOG_LEVEL_INFO |
The info log level. More... | |
#define | KZ_LOG_LEVEL_TRACE |
The trace log level. More... | |
#define | KZ_LOG_LEVEL_ENABLED_THRESHOLD |
Define this macro to one of the existing log levels to set enabled log level threshold. More... | |
Enumerations | |
enum | kanzi::LogLevel { kanzi::LogLevelError, kanzi::LogLevelWarning, kanzi::LogLevelInfo, kanzi::LogLevelTrace } |
The log levels. More... | |
Logging subsystem provides several log levels to classify messages. See Log levels for their definitions. Log levels are ordered according to their severity. Distinct integer number is assigned to each level to implement that ordering. The most severe log level is Error log level (KZ_LOG_LEVEL_ERROR) and it is assigned value of 1. The Error level is followed by Warning log level which is assigned value of 2. Following this strategy log levels are assigned increasing integer numbers while their severity declines. In order to get integer value assigned to log level use KZ_LOG_GET_LEVEL_VALUE macro.
Each log level is assigned name. It's short string describing log level that could be used by the logger when writing log message. See AbstractLogger for more details on how logger could use log level name. Use macro KZ_LOG_GET_LEVEL_NAME to get the name of the log level.
The macro KZ_LOG_LEVEL_ENABLED_THRESHOLD gotherns which log levels are enabled. The log level is enabled if it is same or more severe than log level KZ_LOG_LEVEL_ENABLED_THRESHOLD is set to. Otherwise log level is disabled. The macro KZ_LOG_IS_LEVEL_ENABLED could be used to check if particular log level is enabled or not. Please consult Message classification and filtering section for information on how state of the log level affects message filtering.
The integer value assigned to the log level along with its name are passed to KZ_LOG_CREATE_LEVEL macro when log level is defined. See Log levels for details.
#define KZ_LOG_LEVEL_ENABLED_THRESHOLD |
Define this macro to one of the existing log levels to set enabled log level threshold.
The log level set in KZ_LOG_LEVEL_ENABLED_THRESHOLD macro and all the log levels with higher severity are enabled. The log levels less severe than the one set in KZ_LOG_LEVEL_ENABLED_THRESHOLD are disabled. If you do not define this macro before including this header then it is defined to the default value of KZ_LOG_LEVEL_INFO. For more details on how KZ_LOG_LEVEL_ENABLED_THRESHOLD is used in message filtering, see Log Level.