From b304c26c10b22f8ee6409dbb307ad1a197d41f4b Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Wed, 24 Apr 2024 13:49:50 +0200 Subject: [PATCH] logging: Default to IMMEDIATE mode for native targets Instead of having the boards override the default in their Kconfig.defconfig let's just default to IMMEDIATE logging mode in the main definition if we are building for a ARCH POSIX board. This avoid issues w dependencies being lost if not duplicated correctly. Signed-off-by: Alberto Escolar Piedras --- boards/native/native_posix/Kconfig.defconfig | 10 ---------- boards/native/native_sim/Kconfig.defconfig | 10 ---------- boards/native/nrf_bsim/Kconfig.defconfig | 10 ---------- subsys/logging/Kconfig.mode | 1 + 4 files changed, 1 insertion(+), 30 deletions(-) diff --git a/boards/native/native_posix/Kconfig.defconfig b/boards/native/native_posix/Kconfig.defconfig index a63ba1ad17..75445483d7 100644 --- a/boards/native/native_posix/Kconfig.defconfig +++ b/boards/native/native_posix/Kconfig.defconfig @@ -27,16 +27,6 @@ choice BT_HCI_BUS_TYPE depends on BT_HCI endchoice -if LOG - -# For native_posix we can log synchronously without any problem -# Doing so will be nicer for debugging -choice LOG_MODE - default LOG_MODE_IMMEDIATE -endchoice - -endif # LOG - if CONSOLE config POSIX_ARCH_CONSOLE diff --git a/boards/native/native_sim/Kconfig.defconfig b/boards/native/native_sim/Kconfig.defconfig index 8bf03ac923..9323bfb686 100644 --- a/boards/native/native_sim/Kconfig.defconfig +++ b/boards/native/native_sim/Kconfig.defconfig @@ -27,16 +27,6 @@ choice BT_HCI_BUS_TYPE depends on BT_HCI endchoice -if LOG - -# For native_sim we can log synchronously without any problem -# Doing so will be nicer for debugging -choice LOG_MODE - default LOG_MODE_IMMEDIATE -endchoice - -endif # LOG - if CONSOLE config POSIX_ARCH_CONSOLE diff --git a/boards/native/nrf_bsim/Kconfig.defconfig b/boards/native/nrf_bsim/Kconfig.defconfig index 639c5d4742..f0d1dde660 100644 --- a/boards/native/nrf_bsim/Kconfig.defconfig +++ b/boards/native/nrf_bsim/Kconfig.defconfig @@ -70,16 +70,6 @@ endif # BOARD_NRF5340BSIM_NRF5340_CPUAPP config NRF_802154_ENCRYPTION default n -if LOG - -# For this board we can log synchronously without any problem -# Doing so will be nicer for debugging -choice LOG_MODE - default LOG_MODE_IMMEDIATE -endchoice - -endif # LOG - if CONSOLE config POSIX_ARCH_CONSOLE diff --git a/subsys/logging/Kconfig.mode b/subsys/logging/Kconfig.mode index 61c304ad0b..b573aa5990 100644 --- a/subsys/logging/Kconfig.mode +++ b/subsys/logging/Kconfig.mode @@ -4,6 +4,7 @@ choice LOG_MODE prompt "Mode" depends on !LOG_FRONTEND_ONLY + default LOG_MODE_IMMEDIATE if ARCH_POSIX default LOG_MODE_MINIMAL if LOG_DEFAULT_MINIMAL default LOG_MODE_DEFERRED