From 7c414d4d223251f437e4b90ca04290a0a7de6b69 Mon Sep 17 00:00:00 2001 From: krishna T Date: Tue, 9 May 2023 01:33:06 +0530 Subject: [PATCH] Use unbuffered logging for debugs WPA supplicant debugs are excessive and the incoming rate is high esp. during connection, so, even though we increase the log buffer size, we still miss quite a few events. So, disable buffered logging for debugs, one caveat is that we lose the timestamp that comes with LOG_ macros and also the prints might be jumbled but this is still preferred over losing events. Signed-off-by: Krishna T --- zephyr/Kconfig | 5 ----- zephyr/src/utils/wpa_debug.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/zephyr/Kconfig b/zephyr/Kconfig index b9206ca90..49537d972 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -115,9 +115,4 @@ config WPA_SUPP_DEBUG_LEVEL available levels and functions for emitting the messages. Note that runtime filtering can also be configured in addition to the compile-time filtering. - -# Debug logs need more buffer space -config LOG_BUFFER_SIZE - default 4096 if WPA_SUPP_LOG_LEVEL_DBG - default 2048 endif diff --git a/zephyr/src/utils/wpa_debug.c b/zephyr/src/utils/wpa_debug.c index 542f3e8de..159d56c18 100644 --- a/zephyr/src/utils/wpa_debug.c +++ b/zephyr/src/utils/wpa_debug.c @@ -54,7 +54,7 @@ void wpa_printf_impl(int level, const char *fmt, ...) case MSG_DEBUG: case MSG_MSGDUMP: case MSG_EXCESSIVE: - LOG_DBG("%s", buffer); + printf("%s\n", buffer); break; default: break;