From c75cb5d7ce86c59fd7fc86b5f8213749a22e86e8 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 28 Sep 2026 14:06:40 +0800 Subject: [PATCH] fix: fix log text --- agent/app/task/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/app/task/task.go b/agent/app/task/task.go index 5fa01d580..2425d80c7 100644 --- a/agent/app/task/task.go +++ b/agent/app/task/task.go @@ -154,7 +154,7 @@ func NewTask(name, operate, taskScope, taskID string, resourceID uint) (*Task, e logPath := path.Join(global.Dir.TaskDir, taskScope, taskID+".log") logger := logrus.New() logger.SetFormatter(&SimpleFormatter{}) - logFile, err := os.OpenFile(logPath, os.O_TRUNC|os.O_CREATE|os.O_WRONLY, constant.FilePerm) + logFile, err := os.OpenFile(logPath, os.O_TRUNC|os.O_CREATE|os.O_WRONLY|os.O_APPEND, constant.FilePerm) if err != nil { return nil, fmt.Errorf("failed to open log file: %w", err) }