Quiet grpc info logs in apiserver

Kubernetes-commit: 503f5e1b52812f1bc5bb66d9b02a8f32cc5dccd9
This commit is contained in:
Jordan Liggitt 2021-06-15 18:50:54 -04:00 committed by Kubernetes Publisher
parent b08a6b6de6
commit aafb67c9b2
1 changed files with 9 additions and 3 deletions

View File

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