Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
log_backend.h File Reference
#include <logging/log_msg.h>
#include <logging/log_msg2.h>
#include <stdarg.h>
#include <sys/__assert.h>
#include <sys/util.h>

Go to the source code of this file.

Data Structures

struct  log_backend_api
 Logger backend API. More...
 
struct  log_backend_control_block
 Logger backend control block. More...
 
struct  log_backend
 Logger backend structure. More...
 

Macros

#define LOG_BACKEND_DEFINE(_name, _api, _autostart, ...)
 Macro for creating a logger backend instance. More...
 

Functions

static void log_backend_put (const struct log_backend *const backend, struct log_msg *msg)
 Put message with log entry to the backend. More...
 
static void log_backend_msg2_process (const struct log_backend *const backend, union log_msg2_generic *msg)
 
static void log_backend_put_sync_string (const struct log_backend *const backend, struct log_msg_ids src_level, uint32_t timestamp, const char *fmt, va_list ap)
 Synchronously process log message. More...
 
static void log_backend_put_sync_hexdump (const struct log_backend *const backend, struct log_msg_ids src_level, uint32_t timestamp, const char *metadata, const uint8_t *data, uint32_t len)
 Synchronously process log hexdump_message. More...
 
static void log_backend_dropped (const struct log_backend *const backend, uint32_t cnt)
 Notify backend about dropped log messages. More...
 
static void log_backend_panic (const struct log_backend *const backend)
 Reconfigure backend to panic mode. More...
 
static void log_backend_id_set (const struct log_backend *const backend, uint8_t id)
 Set backend id. More...
 
static uint8_t log_backend_id_get (const struct log_backend *const backend)
 Get backend id. More...
 
static const struct log_backendlog_backend_get (uint32_t idx)
 Get backend. More...
 
static int log_backend_count_get (void)
 Get number of backends. More...
 
static void log_backend_activate (const struct log_backend *const backend, void *ctx)
 Activate backend. More...
 
static void log_backend_deactivate (const struct log_backend *const backend)
 Deactivate backend. More...
 
static bool log_backend_is_active (const struct log_backend *const backend)
 Check state of the backend. More...