Log message API .
More...
Log message API .
◆ LOG_MSG_GENERIC_HDR
#define LOG_MSG_GENERIC_HDR |
#include <zephyr/logging/log_msg.h>
Value:
#define MPSC_PBUF_HDR
Header that must be added to the first word in each packet.
Definition mpsc_packet.h:32
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
◆ LOG_MSG_SIMPLE_ARG_CNT_CHECK
#define LOG_MSG_SIMPLE_ARG_CNT_CHECK |
( |
| ... | ) |
|
#include <zephyr/logging/log_msg.h>
Value:
#define COND_CODE_1(_flag, _if_1_code, _else_code)
Insert code depending on whether _flag expands to 1 or not.
Definition util_macro.h:179
#define NUM_VA_ARGS_LESS_1(...)
Number of arguments in the variable arguments list minus one.
Definition util_macro.h:631
#define UTIL_CAT(a,...)
Definition util_internal.h:104
◆ LOG_MSG_SIMPLE_ARG_TYPE_CHECK
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK |
( |
| ... | ) |
|
#include <zephyr/logging/log_msg.h>
Value:
brief Determine if string arguments types allow to use simplified message creation mode.
- Parameters
-
... | String with arguments. |
◆ LOG_MSG_SIMPLE_ARG_TYPE_CHECK_0
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK_0 |
( |
| fmt | ) |
|
◆ LOG_MSG_SIMPLE_ARG_TYPE_CHECK_1
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK_1 |
( |
| fmt, |
|
|
| arg ) |
◆ LOG_MSG_SIMPLE_ARG_TYPE_CHECK_2
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK_2 |
( |
| fmt, |
|
|
| arg0, |
|
|
| arg1 ) |
◆ LOG_MSG_SIMPLE_CHECK
#define LOG_MSG_SIMPLE_CHECK |
( |
| ... | ) |
|
#include <zephyr/logging/log_msg.h>
Value:
#define LOG_MSG_SIMPLE_ARG_CNT_CHECK(...)
Definition log_msg.h:237
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK(...)
brief Determine if string arguments types allow to use simplified message creation mode.
Definition log_msg.h:250
Check if message can be handled using simplified method.
Following conditions must be met:
- 32 bit platform
- Number of arguments from 0 to 2
- Type of an argument must be a numeric value that fits in 32 bit word.
- Parameters
-
... | String with arguments. |
- Return values
-
1 | if message qualifies. |
0 | if message does not qualify. |
◆ LOG_MSG_SIMPLE_FUNC
#define LOG_MSG_SIMPLE_FUNC |
( |
| _source, |
|
|
| _level, |
|
|
| ... ) |
#include <zephyr/logging/log_msg.h>
Value:
Call specific function to create a log message.
Macro picks matching function (based on number of arguments) and calls it. String arguments are casted to uint32_t.
- Parameters
-
_source | Source. |
_level | Severity level. |
... | String with arguments. |
◆ log_msg_generic_get_wlen()
◆ log_msg_get_data()
#include <zephyr/logging/log_msg.h>
Get data buffer.
- Parameters
-
msg | log message. |
len | location where data length is written. |
- Returns
- pointer to the data buffer.
◆ log_msg_get_domain()
◆ log_msg_get_level()
◆ log_msg_get_package()
#include <zephyr/logging/log_msg.h>
Get string package.
- Parameters
-
msg | log message. |
len | location where string package length is written. |
- Returns
- pointer to the package.
◆ log_msg_get_source()
static const void * log_msg_get_source |
( |
struct log_msg * | msg | ) |
|
|
inlinestatic |
◆ log_msg_get_source_id()
◆ log_msg_get_tid()
static void * log_msg_get_tid |
( |
struct log_msg * | msg | ) |
|
|
inlinestatic |
◆ log_msg_get_timestamp()
◆ log_msg_get_total_wlen()
#include <zephyr/logging/log_msg.h>
Get total length (in 32 bit words) of a log message.
- Parameters
-
desc | Log message descriptor. |
- Returns
- Length.