feat[ulog]: 增加 Kconfig 选项以控制 Finsh/MSH 命令
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled

This commit is contained in:
wdfk-prog
2025-10-31 13:57:30 +08:00
committed by R b b666
parent 934c8195f4
commit 4ee00eba9b
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -192,6 +192,14 @@ menuconfig RT_USING_ULOG
It will enable the log filter.
Such as level filter, log tag filter, log kw filter and tag's level filter.
config ULOG_USING_FINSH_CMD
bool "Enable ulog finsh/msh commands"
depends on ULOG_USING_FILTER && RT_USING_FINSH
default y
help
Enable this option to use ulog commands in finsh/msh,
such as ulog_lvl, ulog_tag, ulog_kw and so on.
config ULOG_USING_SYSLOG
bool "Enable syslog format log and API."
select ULOG_OUTPUT_TIME
+2 -2
View File
@@ -1084,7 +1084,7 @@ const char *ulog_global_filter_kw_get(void)
return ulog.filter.keyword;
}
#ifdef RT_USING_FINSH
#if defined(RT_USING_FINSH) && defined(ULOG_USING_FINSH_CMD)
#include <finsh.h>
static void _print_lvl_info(void)
@@ -1259,7 +1259,7 @@ static void ulog_filter(uint8_t argc, char **argv)
}
}
MSH_CMD_EXPORT(ulog_filter, Show ulog filter settings);
#endif /* RT_USING_FINSH */
#endif /* RT_USING_FINSH && ULOG_USING_FINSH_CMD */
#endif /* ULOG_USING_FILTER */
/**