Skip to content

Commit 639ccf5

Browse files
committed
feat[ulog]: 增加 Kconfig 选项以控制 Finsh/MSH 命令
1 parent ba509f9 commit 639ccf5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

components/utilities/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ menuconfig RT_USING_ULOG
192192
It will enable the log filter.
193193
Such as level filter, log tag filter, log kw filter and tag's level filter.
194194

195+
config ULOG_USING_FINSH_CMD
196+
bool "Enable ulog finsh/msh commands"
197+
depends on ULOG_USING_FILTER && RT_USING_FINSH
198+
default y
199+
help
200+
Enable this option to use ulog commands in finsh/msh,
201+
such as ulog_lvl, ulog_tag, ulog_kw and so on.
202+
195203
config ULOG_USING_SYSLOG
196204
bool "Enable syslog format log and API."
197205
select ULOG_OUTPUT_TIME

components/utilities/ulog/ulog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ const char *ulog_global_filter_kw_get(void)
10841084
return ulog.filter.keyword;
10851085
}
10861086

1087-
#ifdef RT_USING_FINSH
1087+
#if defined(RT_USING_FINSH) && defined(ULOG_USING_FINSH_CMD)
10881088
#include <finsh.h>
10891089

10901090
static void _print_lvl_info(void)

0 commit comments

Comments
 (0)