diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/logger.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/logger.go index 0eb24070e3c..26be6ead90f 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/logger.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/logger.go @@ -32,15 +32,21 @@ type klogWrapper struct{} const klogWrapperDepth = 4 func (klogWrapper) Info(args ...interface{}) { - klog.InfoDepth(klogWrapperDepth, args...) + if klog.V(5).Enabled() { + klog.InfoDepth(klogWrapperDepth, args...) + } } func (klogWrapper) Infoln(args ...interface{}) { - klog.InfoDepth(klogWrapperDepth, fmt.Sprintln(args...)) + if klog.V(5).Enabled() { + klog.InfoDepth(klogWrapperDepth, fmt.Sprintln(args...)) + } } func (klogWrapper) Infof(format string, args ...interface{}) { - klog.InfoDepth(klogWrapperDepth, fmt.Sprintf(format, args...)) + if klog.V(5).Enabled() { + klog.InfoDepth(klogWrapperDepth, fmt.Sprintf(format, args...)) + } } func (klogWrapper) Warning(args ...interface{}) {