Skip to content

Commit

Permalink
logging: Add shell commands
Browse files Browse the repository at this point in the history
Added commands for getting current status and controlling which log
messages are forwared to available backends.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch authored and nashif committed Sep 19, 2018
1 parent c71a559 commit ba01a39
Show file tree
Hide file tree
Showing 5 changed files with 462 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/logging/log_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ u32_t log_src_cnt_get(u32_t domain_id);
* @param domain_id Domain ID.
* @param src_id Source ID.
*
* @return Source name.
* @return Source name or NULL if invalid arguments.
*/
const char *log_source_name_get(u32_t domain_id, u32_t src_id);

Expand Down
4 changes: 2 additions & 2 deletions subsys/logging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ zephyr_sources_ifdef(
)

zephyr_sources_ifdef(
CONFIG_LOG_BACKEND_NATIVE_POSIX
log_backend_native_posix.c
CONFIG_LOG_CMDS
log_cmds.c
)
4 changes: 4 additions & 0 deletions subsys/logging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ config LOG_DOMAIN_ID
help
In multicore system each application/core must have unique domain ID.

config LOG_CMDS
bool "Enable shell commands"
default y if SHELL

config LOG_BACKEND_UART
bool "Enable UART backend"
depends on UART_CONSOLE
Expand Down
Loading

0 comments on commit ba01a39

Please sign in to comment.