rbd: set logger for the controller-runtime

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M 2025-02-25 14:32:48 +05:30 committed by mergify[bot]
parent 5b587c9484
commit 3e4e4ed537

View File

@ -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 (
@ -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()
}