From bc2fdc143bc7a9bbdd197d74c9c449b2784dd4bb Mon Sep 17 00:00:00 2001 From: "Hein Puth (Warkanum)" <208308+warkanum@users.noreply.github.com> Date: Tue, 30 Dec 2025 13:00:56 +0200 Subject: [PATCH] Update pkg/logger/logger.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/logger/logger.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/logger/logger.go b/pkg/logger/logger.go index 857eecd..5e7996c 100644 --- a/pkg/logger/logger.go +++ b/pkg/logger/logger.go @@ -84,12 +84,15 @@ func extractContext(args ...interface{}) (context.Context, []interface{}) { found := false for _, arg := range args { - if c, ok := arg.(context.Context); ok && !found { - ctx = c - found = true - } else { - newArgs = append(newArgs, arg) + if c, ok := arg.(context.Context); ok { + if !found { + ctx = c + found = true + } + // Ignore any additional context.Context arguments after the first one. + continue } + newArgs = append(newArgs, arg) } return ctx, newArgs }