6#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_H_
7#define ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_H_
33#define LOG_OUTPUT_FLAG_COLORS BIT(0)
36#define LOG_OUTPUT_FLAG_TIMESTAMP BIT(1)
39#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP BIT(2)
42#define LOG_OUTPUT_FLAG_LEVEL BIT(3)
45#define LOG_OUTPUT_FLAG_CRLF_NONE BIT(4)
48#define LOG_OUTPUT_FLAG_CRLF_LFONLY BIT(5)
52#define LOG_OUTPUT_FLAG_FORMAT_SYSLOG BIT(6)
55#define LOG_OUTPUT_FLAG_THREAD BIT(7)
58#define LOG_OUTPUT_FLAG_SKIP_SOURCE BIT(8)
65#define LOG_OUTPUT_TEXT 0
67#define LOG_OUTPUT_SYST 1
69#define LOG_OUTPUT_DICT 2
71#define LOG_OUTPUT_CUSTOM 3
127#define LOG_OUTPUT_DEFINE(_name, _func, _buf, _size) \
128 static struct log_output_control_block _name##_control_block; \
129 static const struct log_output _name = { \
131 .control_block = &_name##_control_block, \
205 processed = outf(buf, len, ctx);
239 const char *hostname)
long atomic_t
Definition atomic_types.h:15
void log_output_dropped_process(const struct log_output *output, uint32_t cnt)
Process dropped messages indication.
void log_output_process(const struct log_output *log_output, log_timestamp_t timestamp, const char *domain, const char *source, k_tid_t tid, uint8_t level, const uint8_t *package, const uint8_t *data, size_t data_len, uint32_t flags)
Process input data to a readable string.
void(* log_format_func_t)(const struct log_output *output, struct log_msg *msg, uint32_t flags)
Typedef of the function pointer table "format_table".
Definition log_output.h:112
static void log_output_write(log_output_func_t outf, uint8_t *buf, size_t len, void *ctx)
Write to the output buffer.
Definition log_output.h:200
static void log_output_hostname_set(const struct log_output *output, const char *hostname)
Function for setting hostname of this device.
Definition log_output.h:238
void log_output_timestamp_freq_set(uint32_t freq)
Set timestamp frequency.
void log_output_msg_process(const struct log_output *log_output, struct log_msg *msg, uint32_t flags)
Process log messages v2 to readable strings.
uint64_t log_output_timestamp_to_us(log_timestamp_t timestamp)
Convert timestamp of the message to us.
static void log_output_ctx_set(const struct log_output *output, void *ctx)
Function for setting user context passed to the output function.
Definition log_output.h:227
log_format_func_t log_format_func_t_get(uint32_t log_type)
Declaration of the get routine for function pointer table format_table.
void log_output_msg_syst_process(const struct log_output *log_output, struct log_msg *msg, uint32_t flags)
Process log messages v2 to SYS-T format.
static void log_output_flush(const struct log_output *output)
Flush output buffer.
Definition log_output.h:215
int(* log_output_func_t)(uint8_t *buf, size_t size, void *ctx)
Prototype of the function processing output data.
Definition log_output.h:86
uint32_t log_timestamp_t
Definition log_msg.h:36
flags
Definition parser.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Thread Structure.
Definition thread.h:259
uint8_t data[]
Definition log_msg.h:100
Definition log_output.h:89
atomic_t offset
Definition log_output.h:90
const char * hostname
Definition log_output.h:92
void * ctx
Definition log_output.h:91
Log_output instance structure.
Definition log_output.h:96
struct log_output_control_block * control_block
Definition log_output.h:98
log_output_func_t func
Definition log_output.h:97
uint8_t * buf
Definition log_output.h:99
size_t size
Definition log_output.h:100