From bad9121b3a16ca12ced5b6a00d3b3204fa2e3dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 15 Nov 2024 15:38:25 +0100 Subject: [PATCH 1/2] logging: formatting: Allow coloring in custom cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to support error and warning message coloring LOG_BACKEND_SHOW_COLOR must be set. Allow setting it for customized cases. Signed-off-by: Krzysztof Chruściński --- subsys/logging/Kconfig.formatting | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subsys/logging/Kconfig.formatting b/subsys/logging/Kconfig.formatting index 58ca9bbeccae3..609b3c4178607 100644 --- a/subsys/logging/Kconfig.formatting +++ b/subsys/logging/Kconfig.formatting @@ -134,9 +134,8 @@ config LOG_IMMEDIATE_CLEAN_OUTPUT config LOG_BACKEND_SHOW_COLOR bool "Colors in the backend" - depends on LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \ + default y if LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \ || LOG_BACKEND_SWO || LOG_BACKEND_XTENSA_SIM || SHELL_LOG_BACKEND - default y help When enabled selected backend prints errors in red and warning in yellow. From e1540afaec8d89a1c9acbe5e082fac2b1cd4aeaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 15 Nov 2024 15:55:03 +0100 Subject: [PATCH 2/2] drivers: misc: coresight: Enable log colors for STMESP logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow coloring of error and warning messages decoded by the ETR decoder. Signed-off-by: Krzysztof Chruściński --- drivers/misc/coresight/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/coresight/Kconfig b/drivers/misc/coresight/Kconfig index 17741114e849e..997d0c23c0a54 100644 --- a/drivers/misc/coresight/Kconfig +++ b/drivers/misc/coresight/Kconfig @@ -23,6 +23,7 @@ config NRF_ETR_DECODE select CS_TRACE_DEFMT select LOG_FRONTEND_STMESP_DEMUX select LOG_OUTPUT + imply LOG_BACKEND_SHOW_COLOR imply CBPRINTF_FP_SUPPORT help In this mode, log messages stored by Coresight STM logging frontends are