From fbb564385232ed0cb18c4a7ac0f266fdb4fb4e64 Mon Sep 17 00:00:00 2001 From: Clayton Walker Date: Mon, 10 Apr 2023 18:56:21 -0600 Subject: [PATCH] Simplify logging Signed-off-by: Clayton Walker --- cmd/rollouts-controller/main.go | 4 +--- utils/log/log.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/rollouts-controller/main.go b/cmd/rollouts-controller/main.go index 9984fc1009..bb3cfeba1a 100644 --- a/cmd/rollouts-controller/main.go +++ b/cmd/rollouts-controller/main.go @@ -6,8 +6,6 @@ import ( "strings" "time" - "github.com/sirupsen/logrus" - "github.com/argoproj/pkg/kubeclientmetrics" smiclientset "github.com/servicemeshinterface/smi-sdk-go/pkg/gen/client/split/clientset/versioned" log "github.com/sirupsen/logrus" @@ -85,7 +83,7 @@ func newCommand() *cobra.Command { if logFormat != "" { log.SetFormatter(createFormatter(logFormat)) } - logutil.SetKLogLogger(logrus.New()) + logutil.SetKLogLogger(log.New()) logutil.SetKLogLevel(klogLevel) log.WithField("version", version.GetVersion()).Info("Argo Rollouts starting") diff --git a/utils/log/log.go b/utils/log/log.go index edecc5e4d9..049f26f935 100644 --- a/utils/log/log.go +++ b/utils/log/log.go @@ -7,8 +7,6 @@ import ( "github.com/bombsimon/logrusr/v4" - "github.com/sirupsen/logrus" - log "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" @@ -33,7 +31,7 @@ const ( ) // SetKLogLogger set the klog logger for the k8s go-client -func SetKLogLogger(logger *logrus.Logger) { +func SetKLogLogger(logger *log.Logger) { klog.SetLogger(logrusr.New(logger)) }