Skip to content

Commit

Permalink
rbd: set logger for the controller-runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen M <[email protected]>
  • Loading branch information
iPraveenParihar authored and mergify[bot] committed Feb 25, 2025
1 parent 5b587c9 commit 3e4e4ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/cephcsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/ceph/ceph-csi/internal/util/log"

"k8s.io/klog/v2"
ctrlLog "sigs.k8s.io/controller-runtime/pkg/log"
)

const (
Expand Down Expand Up @@ -160,6 +161,7 @@ func init() {
if err := flag.Set("logtostderr", "true"); err != nil {
klog.Exitf("failed to set logtostderr flag: %v", err)
}
ctrlLog.SetLogger(klog.NewKlogr())
flag.Parse()
}

Expand Down

0 comments on commit 3e4e4ed

Please sign in to comment.