Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: CLI supports setting the logging level

Danielc075980b59e2
diff --git a/kernel/util/runtime.go b/kernel/util/runtime.go
index ac175c6b37..318295634c 100644
--- a/kernel/util/runtime.go
+++ b/kernel/util/runtime.go
@@ -42,6 +42,10 @@ import (
var DisabledFeatures []string
+// CLILogLevel 在 CLI 子命令通过 --log-level 显式指定日志级别时被设置,model.InitConf 末尾据此跳过对
+// logging.SetLogLevel 的覆盖,使命令行参数优先于 conf.json 的 system.logLevel。
+var CLILogLevel string
+
func DisableFeature(feature string) {
DisabledFeatures = append(DisabledFeatures, feature)
DisabledFeatures = gulu.Str.RemoveDuplicatedElem(DisabledFeatures)