Skip to content

Commit 63fa9fe

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

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
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: 2 additions & 2 deletions
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)
@@ -1259,7 +1259,7 @@ static void ulog_filter(uint8_t argc, char **argv)
12591259
}
12601260
}
12611261
MSH_CMD_EXPORT(ulog_filter, Show ulog filter settings);
1262-
#endif /* RT_USING_FINSH */
1262+
#endif /* RT_USING_FINSH && ULOG_USING_FINSH_CMD */
12631263
#endif /* ULOG_USING_FILTER */
12641264

12651265
/**

0 commit comments

Comments
 (0)