|
Anjay Lite
|
Logging API for Anjay Lite. More...
#include <anj/init.h>#include <stdio.h>#include <anj/compat/log_impl_decls.h>#include <anj/utils.h>Go to the source code of this file.
Macros | |
| #define | anj_log(Module, LogLevel, ...) |
| #define | ANJ_LOG_DISPOSABLE(Arg) ANJ_LOG_DISPOSABLE_IMPL(Arg) |
Logging API for Anjay Lite.
Provides macros for emitting log messages with compile-time filtering and configurable backends.
| #define anj_log | ( | Module, | |
| LogLevel, | |||
| ... | |||
| ) |
Logs a message.
Log statements are a subject to compile-time filtering. The level of this statement must be equal or higher than the configured level of the module, if defined, or the default level ( ANJ_LOG_LEVEL_DEFAULT ).
| Module | Name of the module that generates the message, given as a raw token. |
| LogLevel | Log level, specified as a name of anj_log_level_t (other than L_MUTED) with the leading ANJ_LOG_LEVEL_ omitted. |
| #define ANJ_LOG_DISPOSABLE | ( | Arg | ) | ANJ_LOG_DISPOSABLE_IMPL(Arg) |
Replaces a string constant with " " if ANJ_LOG_STRIP_CONSTANTS is enabled. This is useful for wrapping constant parts of log messages, to shorten them, and therefore reduce the size of the binary.
| Arg | A string constant to be potentially replaced with " ". |