diff --git a/subsys/shell/CMakeLists.txt b/subsys/shell/CMakeLists.txt index ac8c3b2186f..276f177d7ba 100644 --- a/subsys/shell/CMakeLists.txt +++ b/subsys/shell/CMakeLists.txt @@ -11,10 +11,12 @@ zephyr_sources_ifdef( shell_ops.c ) -zephyr_sources_ifdef( - CONFIG_SHELL_LOG_BACKEND - shell_log_backend.c +if(NOT CONFIG_SHELL_LOG_BACKEND_CUSTOM) + zephyr_sources_ifdef( + CONFIG_SHELL_LOG_BACKEND + shell_log_backend.c ) +endif() zephyr_sources_ifdef( CONFIG_SHELL_HELP diff --git a/subsys/shell/Kconfig b/subsys/shell/Kconfig index 444e953dddd..696d070a7e4 100644 --- a/subsys/shell/Kconfig +++ b/subsys/shell/Kconfig @@ -277,6 +277,13 @@ config SHELL_LOG_BACKEND using the shell backend's LOG_LEVEL option (e.g. CONFIG_SHELL_TELNET_INIT_LOG_LEVEL_NONE=y). +config SHELL_LOG_BACKEND_CUSTOM + bool "Use custom backend implementation" + help + When enabled, standard implementation of shell log backend is not included. + It allows to provide custom implementation of multiplexing logging messages + with shell data. + config SHELL_LOG_FORMAT_TIMESTAMP bool "Format timestamp" default y