From b5d419114905a24baf1a9988c55a1ed0a318f80e Mon Sep 17 00:00:00 2001 From: Kobayashi Daisuke Date: Tue, 9 Jun 2020 12:01:45 +0900 Subject: [PATCH] Replace StartLogging(klog.Infof) with StartStructuredLogging(0) Kubernetes-commit: 4ae11dac2e2cc8594c528a679db5861c0926b514 --- tools/record/event.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/record/event.go b/tools/record/event.go index 474bdd79..fce4410c 100644 --- a/tools/record/event.go +++ b/tools/record/event.go @@ -123,7 +123,7 @@ type EventBroadcaster interface { // StartStructuredLogging starts sending events received from this EventBroadcaster to the structured // logging function. The return value can be ignored or used to stop recording, if desired. - StartStructuredLogging(verbosity int) watch.Interface + StartStructuredLogging(verbosity klog.Level) watch.Interface // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster // with the event source set to the given event source. @@ -285,7 +285,7 @@ func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...int // StartStructuredLogging starts sending events received from this EventBroadcaster to the structured logging function. // The return value can be ignored or used to stop recording, if desired. -func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity int) watch.Interface { +func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity klog.Level) watch.Interface { return e.StartEventWatcher( func(e *v1.Event) { klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message)