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:
@@ -978,7 +978,7 @@ func openTestStore(t *testing.T) *Store {
|
||||
st, err := OpenStore(config.DatabaseConfig{
|
||||
Driver: config.DriverSQLite,
|
||||
SQLite: config.SQLiteConfig{Path: filepath.Join(t.TempDir(), "mesh_mqtt_go.db")},
|
||||
})
|
||||
}, false)
|
||||
if err != nil {
|
||||
t.Fatalf("OpenStore() error = %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user