From 5ea4063f10732b93ec251250422ff6e493ed648c Mon Sep 17 00:00:00 2001 From: Rok Rozic Date: Mon, 13 Jan 2025 14:02:38 +0100 Subject: [PATCH 1/2] init logger --- cmd/root.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index ec1294e..271c15a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -84,6 +84,9 @@ A CLI tool to help decode @truvami payloads.`, func Execute() { if err := rootCmd.Execute(); err != nil { + logger.NewLogger() + defer logger.Sync() + logger.Logger.Error("error while executing command", zap.Error(err)) os.Exit(1) } From 3c68d4bac34bf4e2a850f6afea43be814de580c6 Mon Sep 17 00:00:00 2001 From: Michael Beutler Date: Mon, 13 Jan 2025 22:21:21 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Removed=20error=20handling.=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/root.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 271c15a..940f1e4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -84,10 +84,6 @@ A CLI tool to help decode @truvami payloads.`, func Execute() { if err := rootCmd.Execute(); err != nil { - logger.NewLogger() - defer logger.Sync() - - logger.Logger.Error("error while executing command", zap.Error(err)) os.Exit(1) } }