Skip to content

Commit

Permalink
Use klog as controller-runtime default logger
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw99 committed Oct 17, 2022
1 parent 8ad090e commit 7a8c3c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import (
"sync"
"time"

"k8s.io/klog/v2"

"github.com/go-logr/logr"
)

Expand Down Expand Up @@ -81,7 +83,8 @@ var (
// set to a NullLogSink.
var (
dlog = NewDelegatingLogSink(NullLogSink{})
Log = logr.New(dlog)
// Log uses `klog` as the controller-runtime default logger.
Log = klog.NewKlogr()
)

// FromContext returns a logger with predefined values from a context.Context.
Expand Down

0 comments on commit 7a8c3c6

Please sign in to comment.