Migrate log to klog.InfoS for staging/src/k8s.io/client-go

Kubernetes-commit: ed1b83c6de5ccc62494e7f0e580cd743ad9a5934
This commit is contained in:
Kobayashi Daisuke 2020-06-03 11:13:54 +09:00 committed by Kubernetes Publisher
parent 57681663d9
commit 10e6fa29f1

View File

@ -275,7 +275,7 @@ func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEv
func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...interface{})) watch.Interface {
return e.StartEventWatcher(
func(e *v1.Event) {
logf("Event(%#v): type: '%v' reason: '%v' %v", e.InvolvedObject, e.Type, e.Reason, e.Message)
klog.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)
})
}