6#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_CTRL_H_
7#define ZEPHYR_INCLUDE_LOGGING_LOG_CTRL_H_
131 return 1 + (
IS_ENABLED(CONFIG_LOG_MULTIDOMAIN) ? z_log_ext_domain_count() : 0);
247 return IS_ENABLED(CONFIG_LOG_MODE_DEFERRED) ? z_log_msg_pending() :
false;
287#if defined(CONFIG_LOG) && !defined(CONFIG_LOG_MODE_MINIMAL)
288#define LOG_CORE_INIT() log_core_init()
289#define LOG_PANIC() log_panic()
290#if defined(CONFIG_LOG_FRONTEND_ONLY)
292#define LOG_PROCESS() false
294#define LOG_INIT() log_init()
295#define LOG_PROCESS() log_process()
298#define LOG_CORE_INIT() do { } while (false)
301#define LOG_PROCESS() false
304#include <syscalls/log_ctrl.h>
int log_source_id_get(const char *name)
Function for finding source ID based on source name.
uint32_t log_src_cnt_get(uint32_t domain_id)
Get number of independent logger sources (modules and instances)
void log_thread_trigger(void)
Trigger the log processing thread to process logs immediately.
void log_init(void)
Function for user initialization of the logger.
int log_mem_get_max_usage(uint32_t *max)
Get maximum memory usage.
uint32_t log_frontend_filter_set(int16_t source_id, uint32_t level)
Set filter on given source for the frontend.
uint32_t log_filter_set(struct log_backend const *const backend, uint32_t domain_id, int16_t source_id, uint32_t level)
Set filter on given source for the provided backend.
void log_core_init(void)
Function system initialization of the logger.
static uint8_t log_domains_count(void)
Return number of domains present in the system.
Definition: log_ctrl.h:129
int log_set_tag(const char *tag)
Configure tag used to prefix each message.
int log_mem_get_usage(uint32_t *buf_size, uint32_t *usage)
Get current memory usage.
void log_thread_set(k_tid_t process_tid)
Function for providing thread which is processing logs.
void log_panic(void)
Switch the logger subsystem to the panic mode.
static bool log_data_pending(void)
Check if there is pending data to be processed by the logging subsystem.
Definition: log_ctrl.h:245
const char * log_source_name_get(uint32_t domain_id, uint32_t source_id)
Get name of the source (module or instance).
bool log_process(void)
Process one pending log message.
uint32_t log_frontend_filter_get(int16_t source_id, bool runtime)
Get source filter for the frontend.
uint32_t log_filter_get(struct log_backend const *const backend, uint32_t domain_id, int16_t source_id, bool runtime)
Get source filter for the provided backend.
const struct log_backend * log_backend_get_by_name(const char *backend_name)
Get backend by name.
uint32_t log_buffered_cnt(void)
Return number of buffered log messages.
const char * log_domain_name_get(uint32_t domain_id)
Get name of the domain.
void log_backend_enable(struct log_backend const *const backend, void *ctx, uint32_t level)
Enable backend with initial maximum filtering level.
log_timestamp_t(* log_timestamp_get_t)(void)
Definition: log_ctrl.h:35
int log_set_timestamp_func(log_timestamp_get_t timestamp_getter, uint32_t freq)
Function for providing timestamp function.
const struct log_backend * log_format_set_all_active_backends(size_t log_type)
Sets logging format for all active backends.
void log_backend_disable(struct log_backend const *const backend)
Disable backend.
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition: util_macro.h:124
uint32_t log_timestamp_t
Definition: log_msg.h:36
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__INT16_TYPE__ int16_t
Definition: stdint.h:73
Thread Structure.
Definition: thread.h:259
Logger backend structure.
Definition: log_backend.h:94