Macros | |
#define | kzLog(logger, level, category, message) |
Use the kzLog macro to write log messages using a custom logger. | |
#define | kzLogDebug(message) |
To write debug log messages with the Default Logger, use kzLogDebug macro. | |
#define | kzLogError(category, message) |
To write error log messages with the Default Logger, use kzLogError macro. | |
#define | kzLogInfo(category, message) |
To write info log messages with the Default Logger, use kzLogInfo macro. | |
#define | kzLogTrace(category, message) |
To write trace log messages with the Default Logger, use kzLogTrace macro. | |
#define | kzLogWarning(category, message) |
To write warning log messages with the Default Logger, use kzLogWarning macro. | |
Use logging macros to write messages to the log. These macros are used to implement compile-time message filtering described in Classifying and filtering log messages.
#define kzLog | ( | logger, | |
level, | |||
category, | |||
message ) |
Use the kzLog macro to write log messages using a custom logger.
This macro assigns the log level
and the log category
to the message and writes it to the log using the logger
you provided. If you want to use your logger to write all the application log messages, register your logger in kanzi::DefaultLogger.
logger | The logger you want to use to write the message to the log. |
level | The log level of the message. |
category | The log category of the message. |
message | The log message. |
To implement your own logger:
To use your own logger to write a message to the log:
#define kzLogError | ( | category, | |
message ) |
To write error log messages with the Default Logger, use kzLogError macro.
This macro assigns KZ_LOG_LEVEL_ERROR log level and the log category
you provided to the message. For more information about the Default Logger, see kanzi::DefaultLogger.
category | The log category assigned to the message. |
message | The log message. |
To write the error message to the log:
#define kzLogWarning | ( | category, | |
message ) |
To write warning log messages with the Default Logger, use kzLogWarning macro.
This macro assigns KZ_LOG_LEVEL_WARNING log level and the log category
you provided to the message. For more information about the Default Logger, see kanzi::DefaultLogger.
category | The log category assigned to the message. |
message | The log message. |
To write the warning message to the log:
#define kzLogInfo | ( | category, | |
message ) |
To write info log messages with the Default Logger, use kzLogInfo macro.
This macro assigns KZ_LOG_LEVEL_INFO log level and the log category
you provided to the message. For more information about the Default Logger, see kanzi::DefaultLogger.
category | The log category assigned to the message. |
message | The log message. |
To write the info message to the log:
#define kzLogTrace | ( | category, | |
message ) |
To write trace log messages with the Default Logger, use kzLogTrace macro.
This macro assigns KZ_LOG_LEVEL_TRACE log level and the log category
you provided to the message. For more information about the Default Logger, see kanzi::DefaultLogger.
category | The log category assigned to the message. |
message | The log message. |
To write the trace message to the log:
#define kzLogDebug | ( | message | ) |
To write debug log messages with the Default Logger, use kzLogDebug macro.
This macro assigns KZ_LOG_LEVEL_INFO log level and KZ_LOG_CATEGORY_DEBUG log category to the message. For more information about the Default Logger, see kanzi::DefaultLogger.
message | The log message. |
To write the debug message to the log: