Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
log_msg.h File Reference
#include <zephyr/logging/log_instance.h>
#include <zephyr/sys/mpsc_packet.h>
#include <zephyr/sys/cbprintf.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/sys/util.h>
#include <string.h>
#include <zephyr/toolchain.h>
#include <alloca.h>
#include <zephyr/syscalls/log_msg.h>

Go to the source code of this file.

Data Structures

struct  log_msg_desc
 
union  log_msg_source
 
struct  log_msg_hdr
 
struct  log_msg
 
struct  log_msg_generic_hdr
 
union  log_msg_generic
 

Macros

#define LOG_MSG_DEBUG   0
 
#define LOG_MSG_DBG(...)
 
#define LOG_MSG_GENERIC_HDR
 
#define LOG_MSG_SIMPLE_ARG_CNT_CHECK(...)
 
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK_0(fmt)
 
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK_1(fmt, arg)
 
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK_2(fmt, arg0, arg1)
 
#define LOG_MSG_SIMPLE_ARG_TYPE_CHECK(...)
 brief Determine if string arguments types allow to use simplified message creation mode.
 
#define LOG_MSG_SIMPLE_CHECK(...)
 Check if message can be handled using simplified method.
 
#define LOG_MSG_SIMPLE_FUNC(_source, _level, ...)
 Call specific function to create a log message.
 

Typedefs

typedef uint32_t log_timestamp_t
 

Functions

static uint32_t log_msg_get_total_wlen (const struct log_msg_desc desc)
 Get total length (in 32 bit words) of a log message.
 
static uint32_t log_msg_generic_get_wlen (const union mpsc_pbuf_generic *item)
 Get length of the log item.
 
static uint8_t log_msg_get_domain (struct log_msg *msg)
 Get log message domain ID.
 
static uint8_t log_msg_get_level (struct log_msg *msg)
 Get log message level.
 
static const void * log_msg_get_source (struct log_msg *msg)
 Get message source data.
 
int16_t log_msg_get_source_id (struct log_msg *msg)
 Get log message source ID.
 
static log_timestamp_t log_msg_get_timestamp (struct log_msg *msg)
 Get timestamp.
 
static void * log_msg_get_tid (struct log_msg *msg)
 Get Thread ID.
 
static uint8_tlog_msg_get_data (struct log_msg *msg, size_t *len)
 Get data buffer.
 
static uint8_tlog_msg_get_package (struct log_msg *msg, size_t *len)
 Get string package.
 

Macro Definition Documentation

◆ LOG_MSG_DBG

#define LOG_MSG_DBG ( ...)
Value:
#define IF_ENABLED(_flag, _code)
Insert code if _flag is defined and equals 1.
Definition util_macro.h:239
#define LOG_MSG_DEBUG
Definition log_msg.h:30
static void printk(const char *fmt,...)
Print kernel debugging message.
Definition printk.h:51

◆ LOG_MSG_DEBUG

#define LOG_MSG_DEBUG   0

Typedef Documentation

◆ log_timestamp_t