1
0
mirror of https://github.com/openshift/image-registry.git synced 2026-02-05 09:45:55 +01:00

Using klog v2

Migrated from k8s.io/klog v1 to k8s.io/klog v2.
This commit is contained in:
Ricardo Maraschini
2020-09-29 15:30:27 +02:00
parent b9ff9fc272
commit d552b78c74

View File

@@ -11,7 +11,7 @@ import (
"time"
log "github.com/sirupsen/logrus"
"k8s.io/klog"
"k8s.io/klog/v2"
"github.com/openshift/library-go/pkg/serviceability"
@@ -27,13 +27,13 @@ func init() {
}
func klogLogLevel() string {
if klog.V(4) {
if klog.V(4).Enabled() {
return "debug"
}
if klog.V(2) {
if klog.V(2).Enabled() {
return "info"
}
if klog.V(1) {
if klog.V(1).Enabled() {
return "warn"
}
return "error"