From c808ef47a4cd126fb0cc364f50afe25fb1a4d32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20S=2E=20R=C3=B8stad?= Date: Wed, 6 Oct 2021 15:46:33 +0200 Subject: [PATCH] applications: asset_tracker_v2: Use deferred logging v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use deferred logging v2. After the change to deferred logging, floats were not properly printed anymore. This patch fixes this issue by using version 2 of deferred logging. Fix suggested in https://github.com/zephyrproject-rtos/zephyr/issues/18351 and documented in https://docs.zephyrproject.org/latest/reference/logging/index.html Signed-off-by: Simen S. Røstad --- applications/asset_tracker_v2/overlay-debug.conf | 3 +-- applications/asset_tracker_v2/prj.conf | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/applications/asset_tracker_v2/overlay-debug.conf b/applications/asset_tracker_v2/overlay-debug.conf index 049640d0badf..91f8fd2b35ad 100644 --- a/applications/asset_tracker_v2/overlay-debug.conf +++ b/applications/asset_tracker_v2/overlay-debug.conf @@ -17,8 +17,7 @@ CONFIG_LOG_MAX_LEVEL=4 # Increase the logging thread capacity so that the debug logs are not lost -CONFIG_LOG_STRDUP_BUF_COUNT=12 -CONFIG_LOG_BUFFER_SIZE=2048 +CONFIG_LOG_BUFFER_SIZE=1280 # Module debug configurations. CONFIG_APPLICATION_MODULE_LOG_LEVEL_DBG=y diff --git a/applications/asset_tracker_v2/prj.conf b/applications/asset_tracker_v2/prj.conf index 75c2097c2ed4..15cb4b154485 100644 --- a/applications/asset_tracker_v2/prj.conf +++ b/applications/asset_tracker_v2/prj.conf @@ -20,9 +20,7 @@ CONFIG_HW_STACK_PROTECTION=y # Logging CONFIG_LOG=y -# Set CONFIG_LOG_STRDUP_BUF_COUNT to a value higher the default value (4) to avoid -# missing logs due to "log_strdup alloc failed" error. -CONFIG_LOG_STRDUP_BUF_COUNT=8 +CONFIG_LOG2_MODE_DEFERRED=y # DK - Used for buttons and LEDs in UI module. CONFIG_DK_LIBRARY_INVERT_LEDS=n