Macros | |
#define | KZ_LOG_CATEGORY_GENERIC_DEFAULT_STATE |
Define this macro to KZ_LOG_ENABLED_CATEGORY or KZ_LOG_DISABLED_CATEGORY to enable or disable KZ_LOG_CATEGORY_GENERIC category. | |
#define | KZ_LOG_CREATE_CATEGORY(state, name) |
Use the KZ_LOG_CREATE_CATEGORY macro to create a log category. | |
#define | KZ_LOG_DISABLED_CATEGORY |
The disabled log category state. | |
#define | KZ_LOG_ENABLED_CATEGORY |
The enabled log category state. | |
#define | KZ_LOG_GET_CATEGORY_NAME(category) |
To get the name of the log category, use KZ_LOG_GET_CATEGORY_NAME. | |
#define | KZ_LOG_GET_CATEGORY_STATE(category) |
To get state of the log category, use KZ_LOG_GET_CATEGORY_STATE macro. | |
#define | KZ_LOG_IS_CATEGORY_ENABLED(category) |
To check if the log category is enabled, use KZ_LOG_IS_CATEGORY_ENABLED. | |
Use these macros to define new log categories and operate on existing ones.
#define KZ_LOG_ENABLED_CATEGORY |
The enabled log category state.
#define KZ_LOG_DISABLED_CATEGORY |
The disabled log category state.
#define KZ_LOG_CREATE_CATEGORY | ( | state, | |
name ) |
Use the KZ_LOG_CREATE_CATEGORY macro to create a log category.
Use the state
parameter to determine the state of the log category. Use the log category state for log message filtering. See Classifying and filtering log messages.
The name
parameter is a short string identity of the log category that is passed to the logger when the log message is written. You can implement a logger to include the category name in the log message. See kanzi::AbstractLogger.
state | The state of the log category. To enable the log category, set the state to KZ_LOG_ENABLED_CATEGORY, and to disable it, set the state to KZ_LOG_DISABLED_CATEGORY. |
name | The name of the log category. |
#define KZ_LOG_GET_CATEGORY_STATE | ( | category | ) |
To get state of the log category, use KZ_LOG_GET_CATEGORY_STATE macro.
For detailed information on the log category state see Log category.
category | the log category. |
#define KZ_LOG_GET_CATEGORY_NAME | ( | category | ) |
To get the name of the log category, use KZ_LOG_GET_CATEGORY_NAME.
For detailed information on the log category name see KZ_LOG_CREATE_CATEGORY.
category | The log category. |
#define KZ_LOG_IS_CATEGORY_ENABLED | ( | category | ) |
To check if the log category is enabled, use KZ_LOG_IS_CATEGORY_ENABLED.
category | The log category. |
#define KZ_LOG_CATEGORY_GENERIC_DEFAULT_STATE |
Define this macro to KZ_LOG_ENABLED_CATEGORY or KZ_LOG_DISABLED_CATEGORY to enable or disable KZ_LOG_CATEGORY_GENERIC category.
This macro is used to set the state of the KZ_LOG_DISABLED_CATEGORY. If you do not define this macro before including this header then it will be defined to the value of KZ_LOG_ENABLED_CATEGORY.