From 1ffa1b14859c5ea21e4021f6fe50496ac170c2ab Mon Sep 17 00:00:00 2001 From: haddscot Date: Mon, 29 Apr 2024 11:49:01 -0700 Subject: [PATCH] fix: log errors from sendLogs with correct variable in common#Start() Signed-off-by: Scott Haddlesey --- logger/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logger/common.go b/logger/common.go index a098490..f0fd6ca 100644 --- a/logger/common.go +++ b/logger/common.go @@ -208,7 +208,7 @@ func (l *Logger) Start( errGroup.Go(func() error { logErr := l.sendLogs(ctx, pipe, source, cleanupTime) if logErr != nil { - err := fmt.Errorf("failed to send logs from pipe %s: %w", source, err) + err := fmt.Errorf("failed to send logs from pipe %s: %w", source, logErr) debug.SendEventsToLog(DaemonName, err.Error(), debug.ERROR, 1) return err }