mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 07:28:14 +00:00
Replace StartLogging(klog.Infof) with StartStructuredLogging(0)
Kubernetes-commit: 4ae11dac2e2cc8594c528a679db5861c0926b514
This commit is contained in:
parent
55768fa31f
commit
b5d4191149
@ -123,7 +123,7 @@ type EventBroadcaster interface {
|
|||||||
|
|
||||||
// StartStructuredLogging starts sending events received from this EventBroadcaster to the structured
|
// 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.
|
// 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
|
// NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster
|
||||||
// with the event source set to the given event source.
|
// 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.
|
// 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.
|
// 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(
|
return e.StartEventWatcher(
|
||||||
func(e *v1.Event) {
|
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)
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user