From b2475804f8502d21c9d7aeddfd35daa764892fdd Mon Sep 17 00:00:00 2001 From: "David T. Pocock" Date: Thu, 22 Aug 2024 20:54:42 +0100 Subject: [PATCH] serial: bluetooth: Print warning once when ring buffer is full This avoids cluttering the logging subsystem. Signed-off-by: David T. Pocock --- drivers/serial/uart_bt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_bt.c b/drivers/serial/uart_bt.c index 9e4a4de5930..bb7207cfe2f 100644 --- a/drivers/serial/uart_bt.c +++ b/drivers/serial/uart_bt.c @@ -160,7 +160,7 @@ static void uart_bt_poll_out(const struct device *dev, unsigned char c) /** Right now we're discarding data if ring-buf is full. */ while (!ring_buf_put(ringbuf, &c, 1)) { if (k_is_in_isr() || !atomic_get(&dev_data->bt.enabled)) { - LOG_INF("Ring buffer full, discard %c", c); + LOG_WRN_ONCE("Ring buffer full, discard %c", c); break; }