From 3e4e78378e77601dedf0751260e0996ff1265c6e Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Mon, 7 Apr 2025 17:35:35 +0200 Subject: [PATCH] Go the slog way Signed-off-by: Benoit Tigeot --- cmd/helm/helm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 39d89b034..c2605f377 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -17,8 +17,8 @@ limitations under the License. package main // import "helm.sh/helm/v4/cmd/helm" import ( - "fmt" "log" + "log/slog" "os" // Import to initialize client auth plugins. @@ -41,7 +41,7 @@ func main() { cmd, err := helmcmd.NewRootCmd(os.Stdout, os.Args[1:]) if err != nil { - helmcmd.Logger.Warn(fmt.Sprintf("%+v", err)) + helmcmd.Logger.Warn("command failed", slog.Any("error", err)) os.Exit(1) }