Skip to content

Commit dbc828e

Browse files
committed
switch to logrusr caller
1 parent a64322f commit dbc828e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/ws-manager-mk2/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/bombsimon/logrusr/v4"
2424
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
2525
"github.com/prometheus/client_golang/prometheus"
26+
"github.com/sirupsen/logrus"
2627
"k8s.io/apimachinery/pkg/runtime"
2728
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
2829
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
@@ -78,7 +79,9 @@ func main() {
7879
flag.Parse()
7980

8081
log.Init(ServiceName, Version, jsonLog, verbose)
81-
baseLogger := logrusr.New(log.Log, logrusr.WithFormatter(func(i interface{}) interface{} {
82+
l := log.WithFields(logrus.Fields{})
83+
l.Logger.SetReportCaller(false)
84+
baseLogger := logrusr.New(l, logrusr.WithFormatter(func(i interface{}) interface{} {
8285
return &scrubber.TrustedValueWrap{Value: scrubber.Default.DeepCopyStruct(i)}
8386
}))
8487
ctrl.SetLogger(baseLogger)

0 commit comments

Comments
 (0)