refactor(config): console_log 提到顶层并细分 web/mqtt/llm/sql;data_dir 归入 ai
- 新增顶层 ConsoleLogConfig{Web, MQTT, LLM, SQL},默认全 true,方便后续按模块扩展
- WebConfig.ConsoleLog 移除;NewRouter/NewHTTPServer 改为显式接 consoleLog 参数
- AIConfig 增加 DataDir,原 Config.DataDir(仅 ai 模块使用)下沉到 ai.data_dir
- OpenStore(cfg, consoleLog) 通过 console_log.sql 控制 gorm logger 级别(Warn/Silent)
- gorm logger 始终设 IgnoreRecordNotFoundError=true,修掉 GetBoolRuntimeSetting
正常缺省路径仍刷屏 'record not found' 的噪声
- 同步更新 install.sh 模板、win/etc 默认 yaml 与所有测试调用点
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -79,12 +79,16 @@ web:
|
||||
port: 8080
|
||||
socket_path: ${SOCKET_PATH}
|
||||
static_dir: ${INSTALL_DIR}/dist
|
||||
console_log: true
|
||||
admin:
|
||||
username: admin
|
||||
password: admin
|
||||
session_secret: ""
|
||||
session_secure: false
|
||||
console_log:
|
||||
web: true
|
||||
mqtt: true
|
||||
llm: true
|
||||
sql: true
|
||||
EOF
|
||||
chown "${SERVICE_USER}:${SERVICE_USER}" "${CONFIG_DIR}/config.yaml"
|
||||
chmod 0640 "${CONFIG_DIR}/config.yaml"
|
||||
|
||||
Reference in New Issue
Block a user