logging: Add handling of dropped messages to UART backend
Extend UART backend to handle dropped messages.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
diff --git a/subsys/logging/log_backend_uart.c b/subsys/logging/log_backend_uart.c
index 85b9fe6..c9c1ae4 100644
--- a/subsys/logging/log_backend_uart.c
+++ b/subsys/logging/log_backend_uart.c
@@ -62,10 +62,18 @@
{
}
+static void dropped(const struct log_backend *const backend, u32_t cnt)
+{
+ ARG_UNUSED(backend);
+
+ log_output_dropped_process(&log_output, cnt);
+}
+
const struct log_backend_api log_backend_uart_api = {
.put = put,
.panic = panic,
.init = log_backend_uart_init,
+ .dropped = dropped,
};
LOG_BACKEND_DEFINE(log_backend_uart, log_backend_uart_api, true);