From 377da7cf3ff1b3530198f9a0420b58f9aa90cae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kesser?= Date: Thu, 14 Mar 2024 10:49:16 +0100 Subject: [PATCH] fix: set default logger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Kesser --- cmd/provider/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/provider/main.go b/cmd/provider/main.go index cc3e43a..d4999bb 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -6,6 +6,8 @@ package main import ( "context" + "io" + "log" "os" "path/filepath" "time" @@ -53,6 +55,9 @@ func main() { kingpin.MustParse(app.Parse(os.Args[1:])) + log.Default().SetOutput(io.Discard) + ctrl.SetLogger(zap.New(zap.WriteTo(io.Discard))) + zl := zap.New(zap.UseDevMode(*debug)) log := logging.NewLogrLogger(zl.WithName("provider-pagerduty")) if *debug {