refactor(client): 抽统一日志函数 logLine + 去掉重复时间戳
- log_time.dart → log.dart:提供 logLine(tag, msg),格式 `[时:分:秒.毫秒] [tag] msg`, DesktopKernel / DesktopVpnBridge 散落的 print+拼接全部收敛到此。 - 下发配置 log.timestamp=false:sing-box 不再自带时间戳,避免一行打印两个时间 (之前 `[22:10:35.213] [stderr] +0800 2026-06-18 22:10:35 ...` 重复)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -143,7 +143,9 @@ func BuildClientConfig(node *nodes.NodeRow, dpUUID, deriveKey string) ([]byte, e
|
||||
}
|
||||
|
||||
cfg := map[string]any{
|
||||
"log": map[string]any{"level": "warn", "timestamp": true},
|
||||
// timestamp=false:客户端日志出口(logLine)已统一加时间戳,
|
||||
// 关掉 sing-box 自带时间戳避免一行打印两个时间。
|
||||
"log": map[string]any{"level": "warn", "timestamp": false},
|
||||
"inbounds": []any{tunIn},
|
||||
"outbounds": append(proxyOutbounds,
|
||||
autoBest,
|
||||
|
||||
Reference in New Issue
Block a user