Skip to content

Commit

Permalink
Simplify logging
Browse files Browse the repository at this point in the history
Signed-off-by: Clayton Walker <[email protected]>
  • Loading branch information
Sineaggi committed Apr 11, 2023
1 parent 38d0352 commit fbb5643
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions cmd/rollouts-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")

Expand Down
4 changes: 1 addition & 3 deletions utils/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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))
}

Expand Down

0 comments on commit fbb5643

Please sign in to comment.