fix: agent page and agent cmd

This commit is contained in:
engigu
2025-12-29 22:22:56 +08:00
parent 1b6ae38cfb
commit 696e523d9d
3 changed files with 183 additions and 109 deletions
+6 -1
View File
@@ -65,5 +65,10 @@ func initLogger(logFile string) {
Compress: false,
}
log.SetOutput(io.MultiWriter(os.Stdout, lumberjackLogger))
// daemon 模式下只输出到文件,避免重复日志
if isDaemon {
log.SetOutput(lumberjackLogger)
} else {
log.SetOutput(io.MultiWriter(os.Stdout, lumberjackLogger))
}
}