Kanzi 3.9.10
log_macro.hpp File Reference
#include <kanzi/core/log/log_category.hpp>
#include <kanzi/core/log/log_level.hpp>
#include <kanzi/core/cpp/cstddef.hpp>
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/preprocessor/control/expr_if.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/logical/and.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/tuple/to_seq.hpp>

Namespaces

namespace  kanzi
 

Macros

#define KZ_LOG_APPEND_FILTERED_MESSAGES_INTERNAL(logger, level, category, messages)
 Logs message after filter is passed. See KZ_LOG_APPLY_FILTER_INTERNAL() for details.
 
#define KZ_LOG_APPEND_SINGLE_MESSAGE_INTERNAL(unusedParameter, method, value)
 Helper macro.
 
#define KZ_LOG_ARE_LEVEL_AND_CATEGORY_ENABLED(level, category)
 Tests whether level and category are enabled.
 
#define KZ_LOG_BUNDLE_MULTIPLE_MESSAGES_INTERNAL(numberOfMessages, messages)
 Bundles multiple formatted messages for the Logging subsystem to use internally.
 
#define KZ_LOG_FILTER_MESSAGES_INTERNAL(logger, level, category, messages)
 Filters messages by log level and category and, if the messages pass the filter, appends them to the log.
 

Macro Definition Documentation

◆ KZ_LOG_BUNDLE_MULTIPLE_MESSAGES_INTERNAL

#define KZ_LOG_BUNDLE_MULTIPLE_MESSAGES_INTERNAL ( numberOfMessages,
messages )

Bundles multiple formatted messages for the Logging subsystem to use internally.

Do not use this macro directly. Only the Logging subsystem uses this macro. This macro bundles several formatted messages into a sequence to be passed to KZ_LOG_FILTER_MESSAGES_INTERNAL() as messages argument. See kzLog().

Parameters
numberOfMessagesNumber of formatted messages in a bundle.
messagesMessages to be bundled.

◆ KZ_LOG_FILTER_MESSAGES_INTERNAL

#define KZ_LOG_FILTER_MESSAGES_INTERNAL ( logger,
level,
category,
messages )

Filters messages by log level and category and, if the messages pass the filter, appends them to the log.

This macro filters log messages based on enabled level and category. For a message to pass the filter, both level and category must be enabled.

Parameters
loggerLogger to which to write messages.
levelThe log level of the message.
categoryThe log category of the message.
messagesLog messages. See kzLog() macro for details.

◆ KZ_LOG_ARE_LEVEL_AND_CATEGORY_ENABLED

#define KZ_LOG_ARE_LEVEL_AND_CATEGORY_ENABLED ( level,
category )

Tests whether level and category are enabled.

◆ KZ_LOG_APPEND_SINGLE_MESSAGE_INTERNAL

#define KZ_LOG_APPEND_SINGLE_MESSAGE_INTERNAL ( unusedParameter,
method,
value )

Helper macro.

◆ KZ_LOG_APPEND_FILTERED_MESSAGES_INTERNAL

#define KZ_LOG_APPEND_FILTERED_MESSAGES_INTERNAL ( logger,
level,
category,
messages )

Logs message after filter is passed. See KZ_LOG_APPLY_FILTER_INTERNAL() for details.