github.com/argoproj/argo-cd@v1.8.7/util/log/logrus.go (about)

     1  package log
     2  
     3  import (
     4  	"fmt"
     5  
     6  	adapter "github.com/bombsimon/logrusr"
     7  	"github.com/go-logr/logr"
     8  	"github.com/sirupsen/logrus"
     9  )
    10  
    11  func NewLogrusLogger(fieldLogger logrus.FieldLogger) logr.Logger {
    12  	return adapter.NewLoggerWithFormatter(fieldLogger, func(val interface{}) string {
    13  		return fmt.Sprintf("%v", val)
    14  	})
    15  }