From 503f5e1b52812f1bc5bb66d9b02a8f32cc5dccd9 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Tue, 15 Jun 2021 18:50:54 -0400 Subject: [PATCH] Quiet grpc info logs in apiserver --- .../src/k8s.io/apiserver/pkg/storage/etcd3/logger.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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{}) {