GPS Device
Loading...
Searching...
No Matches
Log Macros

Compile-time-gated convenience macros for emitting log messages. More...

Collaboration diagram for Log Macros:

Macros

#define LOG_INFO(subsys, lvl, fmt, ...)
#define LOG_DEBUG(subsys, lvl, fmt, ...)
#define LOG_WARNING(subsys, lvl, fmt, ...)
#define LOG_ERROR(subsys, lvl, fmt, ...)
#define LOG_CRITICAL(subsys, lvl, fmt, ...)

Detailed Description

Compile-time-gated convenience macros for emitting log messages.

When CONFIG_COMPILE_WITH_LOGGING is defined, each macro expands to a call to log_print with the appropriate severity level. When the define is absent, all macros expand to ((void)0), producing no code and zero runtime overhead.

Parameters
subsysThe MODULES_te identifier of the calling subsystem.
lvlThe LOG_LEVEL_te threshold of the calling subsystem.
fmtPrintf-style format string.
...Arguments for the format specifiers in fmt.

Macro Definition Documentation

◆ LOG_INFO

#define LOG_INFO ( subsys,
lvl,
fmt,
... )
Value:
((void)0)

No-op when logging is disabled.

Definition at line 255 of file log.h.

◆ LOG_DEBUG

#define LOG_DEBUG ( subsys,
lvl,
fmt,
... )
Value:
((void)0)

No-op when logging is disabled.

Definition at line 256 of file log.h.

◆ LOG_WARNING

#define LOG_WARNING ( subsys,
lvl,
fmt,
... )
Value:
((void)0)

No-op when logging is disabled.

Definition at line 257 of file log.h.

◆ LOG_ERROR

#define LOG_ERROR ( subsys,
lvl,
fmt,
... )
Value:
((void)0)

No-op when logging is disabled.

Definition at line 258 of file log.h.

◆ LOG_CRITICAL

#define LOG_CRITICAL ( subsys,
lvl,
fmt,
... )
Value:
((void)0)

No-op when logging is disabled.

Definition at line 259 of file log.h.