74#define RA8_LOG_LEVEL_NONE (0)
76#define RA8_LOG_LEVEL_ERROR (1)
78#define RA8_LOG_LEVEL_WARN (2)
80#define RA8_LOG_LEVEL_INFO (3)
82#define RA8_LOG_LEVEL_DEBUG (4)
84typedef enum : uint8_t {
95#define RA8_LOG_LEVEL RA8_LOG_LEVEL_INFO
98#define RA8_LOG_LEVEL RA8_LOG_LEVEL_WARN
333#if RA8_LOG_LEVEL >= RA8_LOG_LEVEL_ERROR
335#define ra8_log_error(tag, message) ra8_log_emit_error((tag), (message))
337#define ra8_log_error_val(tag, message, value) ra8_log_emit_error_val((tag), (message), (value))
340#define ra8_log_error(tag, message) ((void)0)
342#define ra8_log_error_val(tag, message, value) ((void)0)
345#if RA8_LOG_LEVEL >= RA8_LOG_LEVEL_WARN
347#define ra8_log_warn(tag, message) ra8_log_emit_warn((tag), (message))
349#define ra8_log_warn_val(tag, message, value) ra8_log_emit_warn_val((tag), (message), (value))
352#define ra8_log_warn(tag, message) ((void)0)
354#define ra8_log_warn_val(tag, message, value) ((void)0)
357#if RA8_LOG_LEVEL >= RA8_LOG_LEVEL_INFO
359#define ra8_log_info(tag, message) ra8_log_emit_info((tag), (message))
361#define ra8_log_info_val(tag, message, value) ra8_log_emit_info_val((tag), (message), (value))
364#define ra8_log_info(tag, message) ((void)0)
366#define ra8_log_info_val(tag, message, value) ((void)0)
369#if RA8_LOG_LEVEL >= RA8_LOG_LEVEL_DEBUG
371#define ra8_log_debug(tag, message) ra8_log_emit_debug((tag), (message))
373#define ra8_log_debug_val(tag, message, value) ra8_log_emit_debug_val((tag), (message), (value))
376#define ra8_log_debug(tag, message) ((void)0)
378#define ra8_log_debug_val(tag, message, value) ((void)0)
#define RA8_LOG_LEVEL_ERROR
RA8 LOG LEVEL ERROR.
void ra8_log_init(void)
Initialise the logging backend.
ra8_log_level_t
Compile-time and runtime log level.
@ k_ra8_log_level_warn
Errors + warnings.
@ k_ra8_log_level_info
Errors + warnings + info (default for Debug).
@ k_ra8_log_level_error
Errors only.
@ k_ra8_log_level_none
Disable all logging.
@ k_ra8_log_level_debug
Everything, including per-iteration traces.
#define RA8_LOG_LEVEL_DEBUG
RA8 LOG LEVEL DEBUG.
void ra8_log_set_byte_sink(ra8_log_byte_sink_fn_t fn, void *ctx)
Install (or clear) an optional byte sink for log output.
#define RA8_LOG_LEVEL_NONE
void ra8_log_emit_info(const char *tag, const char *message)
Emit an INFO-level log line with only a tag and a message.
void ra8_log_emit_error(const char *tag, const char *message)
Emit an ERROR-level log line with only a tag and a message.
#define RA8_LOG_LEVEL_WARN
RA8 LOG LEVEL WARN.
void ra8_log_emit_debug(const char *tag, const char *message)
Emit a DEBUG-level log line with only a tag and a message.
void ra8_log_emit_info_val(const char *tag, const char *message, uint32_t value)
Emit an INFO log line with a uint32_t companion value.
void ra8_log_emit_warn_val(const char *tag, const char *message, uint32_t value)
Emit a WARN log line with a uint32_t companion value.
void(* ra8_log_byte_sink_fn_t)(void *ctx, uint8_t byte)
Optional per-byte sink for redirecting log output off ITM.
void ra8_log_emit_debug_val(const char *tag, const char *message, int32_t value)
Emit a DEBUG log line with an int32_t companion value.
void ra8_log_emit_error_val(const char *tag, const char *message, uint32_t value)
Emit an ERROR log line with a uint32_t companion value.
#define RA8_LOG_LEVEL_INFO
RA8 LOG LEVEL INFO.
void ra8_log_emit_warn(const char *tag, const char *message)
Emit a WARN-level log line with only a tag and a message.