Zephyr Project API 4.4.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
13
14#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_CUSTOM_H_
15#define ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_CUSTOM_H_
16
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27
39 struct log_msg *msg, uint32_t flags);
40
46
47
62typedef int (*log_timestamp_printer_t)(const struct log_output *output, const char *fmt, ...);
63
81typedef int (*log_timestamp_format_func_t)(const struct log_output *output,
82 const log_timestamp_t timestamp,
83 const log_timestamp_printer_t printer);
84
94int log_custom_timestamp_print(const struct log_output *output, const log_timestamp_t timestamp,
95 const log_timestamp_printer_t printer);
96
103
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif /* ZEPHYR_INCLUDE_LOGGING_LOG_OUTPUT_CUSTOM_H_ */
uint32_t log_timestamp_t
Timestamp value associated with a log message.
Definition log_msg.h:54
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:133
void log_custom_output_msg_process(const struct log_output *log_output, struct log_msg *msg, uint32_t flags)
Custom logging output formatting.
Header file for the log output formatter.
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:62
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:81
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:97
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Log output instance.
Definition log_output.h:119