From ce6297c5011e8a5f36c18374e1e664fb7c25b035 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Wed, 12 Jan 2022 11:12:08 +0100 Subject: [PATCH] logging: Deprecate backend API Deprecate v1 backend API. Signed-off-by: Krzysztof Chruscinski --- include/logging/log_backend.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/logging/log_backend.h b/include/logging/log_backend.h index b9270482c52..dca4aae47f7 100644 --- a/include/logging/log_backend.h +++ b/include/logging/log_backend.h @@ -30,9 +30,11 @@ struct log_backend; * @brief Logger backend API. */ struct log_backend_api { + /* Logging v2 function. */ void (*process)(const struct log_backend *const backend, union log_msg2_generic *msg); + /* DEPRECATED! Functions used for logging v1. */ void (*put)(const struct log_backend *const backend, struct log_msg *msg); void (*put_sync_string)(const struct log_backend *const backend, @@ -42,6 +44,7 @@ struct log_backend_api { struct log_msg_ids src_level, uint32_t timestamp, const char *metadata, const uint8_t *data, uint32_t len); + /* Functions used by v1 and v2 */ void (*dropped)(const struct log_backend *const backend, uint32_t cnt); void (*panic)(const struct log_backend *const backend); void (*init)(const struct log_backend *const backend); @@ -98,6 +101,8 @@ extern const struct log_backend __log_backends_end[]; /** * @brief Put message with log entry to the backend. * + * @warning DEPRECATED. Use logging v2. + * * @param[in] backend Pointer to the backend instance. * @param[in] msg Pointer to message with log entry. */ @@ -122,6 +127,8 @@ static inline void log_backend_msg2_process( /** * @brief Synchronously process log message. * + * @warning DEPRECATED. Use logging v2. + * * @param[in] backend Pointer to the backend instance. * @param[in] src_level Message details. * @param[in] timestamp Timestamp. @@ -145,6 +152,8 @@ static inline void log_backend_put_sync_string( /** * @brief Synchronously process log hexdump_message. * + * @warning DEPRECATED. Use logging v2. + * * @param[in] backend Pointer to the backend instance. * @param[in] src_level Message details. * @param[in] timestamp Timestamp.