6#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_H_
7#define ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_H_
28#define LOG_OUTPUT_FLAG_COLORS BIT(0)
31#define LOG_OUTPUT_FLAG_TIMESTAMP BIT(1)
34#define LOG_OUTPUT_FLAG_FORMAT_TIMESTAMP BIT(2)
37#define LOG_OUTPUT_FLAG_LEVEL BIT(3)
40#define LOG_OUTPUT_FLAG_CRLF_NONE BIT(4)
43#define LOG_OUTPUT_FLAG_CRLF_LFONLY BIT(5)
47#define LOG_OUTPUT_FLAG_FORMAT_SYSLOG BIT(6)
52#define LOG_OUTPUT_FLAG_FORMAT_SYST BIT(7)
57#define LOG_OUTPUT_TEXT 0
59#define LOG_OUTPUT_SYST 1
61#define LOG_OUTPUT_DICT 2
117#define LOG_OUTPUT_DEFINE(_name, _func, _buf, _size) \
118 static struct log_output_control_block _name##_control_block; \
119 static const struct log_output _name = { \
121 .control_block = &_name##_control_block, \
231 const char *hostname)
long atomic_t
Definition: atomic.h:22
void log_output_dropped_process(const struct log_output *output, uint32_t cnt)
Process dropped messages indication.
void log_output_flush(const struct log_output *output)
Flush output buffer.
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:230
void log_output_timestamp_freq_set(uint32_t freq)
Set timestamp frequency.
void log_output_hexdump(const struct log_output *output, struct log_msg_ids src_level, uint32_t timestamp, const char *metadata, const uint8_t *data, uint32_t length, uint32_t flags)
Process log hexdump.
void log_output_msg_process(const struct log_output *output, struct log_msg *msg, uint32_t flags)
Process log messages to readable strings.
void(* log_format_func_t)(const struct log_output *output, struct log_msg2 *msg2, uint32_t flags)
Typedef of the function pointer table "format_table".
Definition: log_output.h:102
void log_output_msg2_process(const struct log_output *log_output, struct log_msg2 *msg, uint32_t flags)
Process log messages v2 to readable strings.
void log_output_msg2_syst_process(const struct log_output *log_output, struct log_msg2 *msg, uint32_t flag)
Process log messages v2 to SYS-T format.
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:219
void log_output_string(const struct log_output *output, struct log_msg_ids src_level, uint32_t timestamp, const char *fmt, va_list ap, uint32_t flags)
Process log string.
log_format_func_t log_format_func_t_get(uint32_t log_type)
Declaration of the get routine for function pointer table format_table.
uint64_t log_output_timestamp_to_us(uint32_t timestamp)
Convert timestamp of the message to us.
int(* log_output_func_t)(uint8_t *buf, size_t size, void *ctx)
Prototype of the function processing output data.
Definition: log_output.h:76
flags
Definition: http_parser.h:131
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
Definition: log_msg2.h:88
Part of log message header identifying source and level.
Definition: log_msg.h:85
Log message structure.
Definition: log_msg.h:139
Definition: log_output.h:79
atomic_t offset
Definition: log_output.h:80
const char * hostname
Definition: log_output.h:82
void * ctx
Definition: log_output.h:81
Log_output instance structure.
Definition: log_output.h:86
struct log_output_control_block * control_block
Definition: log_output.h:88
log_output_func_t func
Definition: log_output.h:87
uint8_t * buf
Definition: log_output.h:89
size_t size
Definition: log_output.h:90
static fdata_t data[2]
Definition: test_fifo_contexts.c:15
static uint32_t flag[3]
Definition: thread_competition.c:23
static void msg(uint64_t c64)
Definition: main.c:17