Skip to content

Commit 6d1a31b

Browse files
nordic-krchnashif
authored andcommitted
logging: Add uart backend dependency to shell uart backend
If shell UART backend was enabled and logger uart backend was not explicitly disabled then both were used resulting in logs being printed twice on terminal. Patch modifies default state of log uart backend to depend on state of shell uart backend. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent 1b1f832 commit 6d1a31b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

samples/subsys/shell/shell_module/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
CONFIG_PRINTK=y
22
CONFIG_SHELL=y
33
CONFIG_LOG=y
4-
CONFIG_LOG_BACKEND_UART=n
54
CONFIG_KERNEL_SHELL=y
65
CONFIG_THREAD_MONITOR=y
76
CONFIG_INIT_STACKS=y

samples/subsys/shell/shell_module/prj_minimal.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
CONFIG_PRINTK=y
22
CONFIG_SHELL=y
33
CONFIG_SERIAL=y
4-
CONFIG_LOG_BACKEND_UART=n
54
CONFIG_KERNEL_SHELL=n
65
CONFIG_OBJECT_TRACING=y
76
CONFIG_THREAD_MONITOR=y

subsys/logging/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ config LOG_CMDS
290290
config LOG_BACKEND_UART
291291
bool "Enable UART backend"
292292
depends on UART_CONSOLE
293-
default y
293+
default y if !SHELL_BACKEND_SERIAL
294294
help
295295
When enabled backend is using UART to output logs.
296296

0 commit comments

Comments
 (0)