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

 kanzi
 

Macros

#define KZ_LOG_BUNDLE_MULTIPLE_MESSAGES_INTERNAL(numberOfMessages, messages)
 Bundles multiple formatted messages for the Logging subsystem to use internally. More...
 
#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. More...
 
#define KZ_LOG_ARE_LEVEL_AND_CATEGORY_ENABLED(level, category)
 Tests whether level and category are enabled. More...
 
#define KZ_LOG_APPEND_SINGLE_MESSAGE_INTERNAL(unsusedParameter, method, value)
 Helper macro. More...
 
#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. More...
 
#define KZ_LOG_TYPENAME_TN_INTERNAL(notUsed, argNum, maxArgNum)
 Helper macro. More...
 
#define KZ_LOG_CONST_REF_TN_INTERNAL(notUsed, argNum, maxArgNum)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_TEMPLATE_ARGUMENTS_INTERNAL(numArgs)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_ARGUMENTS_INTERNAL(numArgs)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_PASS_ARGUMENTS_INTERNAL(numArgs)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_WRAP_ONE_ARGUMENT_INTERNAL(notUsed, argNum, maxArgNum)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_WRAP_ALL_ARGUMENTS_INTERNAL(numArgs)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_ENUM_ONE_WRAPPED_ARGUMENT_INTERNAL(notUsed, argNum, maxArgNum)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_ENUM_ALL_WRAPPED_ARGUMENTS_INTERNAL(numArgs)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_WRAP_ARGUMENTS_INTERNAL(numArgs)
 Helper macro. More...
 
#define KZ_LOG_APPEND_MESSAGE_DEFINITION(numArgs)
 Creates definition of template appendMessage() method with specified number of template arguments. More...
 

Macro Definition Documentation

#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.
#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.
messageLog message. See kzLog() macro for details.
#define KZ_LOG_ARE_LEVEL_AND_CATEGORY_ENABLED (   level,
  category 
)

Tests whether level and category are enabled.

#define KZ_LOG_APPEND_SINGLE_MESSAGE_INTERNAL (   unsusedParameter,
  method,
  value 
)

Helper macro.

#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_TYPENAME_TN_INTERNAL (   notUsed,
  argNum,
  maxArgNum 
)

Helper macro.

#define KZ_LOG_CONST_REF_TN_INTERNAL (   notUsed,
  argNum,
  maxArgNum 
)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_TEMPLATE_ARGUMENTS_INTERNAL (   numArgs)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_ARGUMENTS_INTERNAL (   numArgs)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_PASS_ARGUMENTS_INTERNAL (   numArgs)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_WRAP_ONE_ARGUMENT_INTERNAL (   notUsed,
  argNum,
  maxArgNum 
)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_WRAP_ALL_ARGUMENTS_INTERNAL (   numArgs)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_ENUM_ONE_WRAPPED_ARGUMENT_INTERNAL (   notUsed,
  argNum,
  maxArgNum 
)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_ENUM_ALL_WRAPPED_ARGUMENTS_INTERNAL (   numArgs)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_WRAP_ARGUMENTS_INTERNAL (   numArgs)

Helper macro.

#define KZ_LOG_APPEND_MESSAGE_DEFINITION (   numArgs)

Creates definition of template appendMessage() method with specified number of template arguments.

Parameters
numArgsThe number of template arguments.