Skip to content

Commit d7fc7ac

Browse files
committed
logging: Add shell commands
Added commands for getting current status and controlling which log messages are forwared to available backends. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent f8289ac commit d7fc7ac

File tree

5 files changed

+462
-6
lines changed

5 files changed

+462
-6
lines changed

include/logging/log_ctrl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ u32_t log_src_cnt_get(u32_t domain_id);
104104
* @param domain_id Domain ID.
105105
* @param src_id Source ID.
106106
*
107-
* @return Source name.
107+
* @return Source name or NULL if invalid arguments.
108108
*/
109109
const char *log_source_name_get(u32_t domain_id, u32_t src_id);
110110

subsys/logging/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ zephyr_sources_ifdef(
1515
)
1616

1717
zephyr_sources_ifdef(
18-
CONFIG_LOG_BACKEND_NATIVE_POSIX
19-
log_backend_native_posix.c
18+
CONFIG_LOG_CMDS
19+
log_cmds.c
2020
)

subsys/logging/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ config LOG_DOMAIN_ID
263263
help
264264
In multicore system each application/core must have unique domain ID.
265265

266+
config LOG_CMDS
267+
bool "Enable shell commands"
268+
default y if SHELL
269+
266270
config LOG_BACKEND_UART
267271
bool "Enable UART backend"
268272
depends on UART_CONSOLE

0 commit comments

Comments
 (0)