|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Header file for custom log output formatting. More...
#include <zephyr/logging/log_output.h>Go to the source code of this file.
| typedef 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. | |
| typedef 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_CUSTOM_TIMESTAMP. | |
| void | log_custom_output_msg_process (const struct log_output *log_output, struct log_msg *msg, uint32_t flags) |
| Custom logging output formatting. | |
| 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_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_timestamp_set (log_timestamp_format_func_t format) |
| Set the timestamp formatting function that will be applied when LOG_OUTPUT_FORMAT_CUSTOM_TIMESTAMP. |
Header file for custom log output formatting.
| typedef 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_CUSTOM_TIMESTAMP.
Example function:
| output | The logger instance to write to |
| timestamp | Message timestamp to format. |
| printer | The printing function to use when formatting the timestamp. |
| typedef 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.
Example usage:
| output | The logger instance to write to |
| fmt | The format string |
| ... | optional arguments for the format string |
| void log_custom_output_msg_set | ( | log_format_func_t | format | ) |
Set the formatting log function that will be applied with LOG_OUTPUT_CUSTOM.
| format | Pointer to the external formatter function |
| 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.
Function is using provided context with the buffer and output function to process formatted string and output the data.
| output | Pointer to the log output instance. |
| timestamp | Message timestamp to format. |
| printer | The printing function to use when formatting the timestamp. |
| 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.
| format | Pointer to the external formatter function |