Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
log_output_custom.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Converge
3 * Copyright (c) 2023 Nobleo Technology
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_CUSTOM_H_
8#define ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_CUSTOM_H_
9
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
32 struct log_msg *msg, uint32_t flags);
33
39
40
55typedef int (*log_timestamp_printer_t)(const struct log_output *output, const char *fmt, ...);
56
74typedef int (*log_timestamp_format_func_t)(const struct log_output *output,
75 const log_timestamp_t timestamp,
76 const log_timestamp_printer_t printer);
77
87int log_custom_timestamp_print(const struct log_output *output, const log_timestamp_t timestamp,
88 const log_timestamp_printer_t printer);
89
96
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_CUSTOM_H_ */
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
void log_custom_output_msg_process(const struct log_output *log_output, struct log_msg *msg, uint32_t flags)
Custom logging output formatting.
uint32_t log_timestamp_t
Definition log_msg.h:36
int log_custom_timestamp_print(const struct log_output *output, const log_timestamp_t timestamp, const log_timestamp_printer_t printer)
Format the timestamp with a external function.
void log_custom_output_msg_set(log_format_func_t format)
Set the formatting log function that will be applied with LOG_OUTPUT_CUSTOM.
int(* log_timestamp_printer_t)(const struct log_output *output, const char *fmt,...)
Prototype of a printer function that can print the given timestamp into a specific logger instance.
Definition log_output_custom.h:55
int(* log_timestamp_format_func_t)(const struct log_output *output, const log_timestamp_t timestamp, const log_timestamp_printer_t printer)
Prototype of the function that will apply custom formatting to a timestamp when LOG_OUTPUT_FORMAT_CUS...
Definition log_output_custom.h:74
void log_custom_timestamp_set(log_timestamp_format_func_t format)
Set the timestamp formatting function that will be applied when LOG_OUTPUT_FORMAT_CUSTOM_TIMESTAMP.
flags
Definition parser.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Definition log_msg.h:94
Log_output instance structure.
Definition log_output.h:96