Replace StartLogging(klog.Infof) with StartStructuredLogging(0)

This commit is contained in:
Kobayashi Daisuke
2020-06-09 12:01:45 +09:00
parent dcaa8d7126
commit 4ae11dac2e
34 changed files with 36 additions and 43 deletions

View File

@@ -375,7 +375,7 @@ func NewNodeLifecycleController(
eventBroadcaster := record.NewBroadcaster()
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "node-controller"})
eventBroadcaster.StartLogging(klog.Infof)
eventBroadcaster.StartStructuredLogging(0)
klog.Infof("Sending events to api server.")
eventBroadcaster.StartRecordingToSink(

View File

@@ -158,7 +158,7 @@ func getMinTolerationTime(tolerations []v1.Toleration) time.Duration {
func NewNoExecuteTaintManager(c clientset.Interface, getPod GetPodFunc, getNode GetNodeFunc, getPodsAssignedToNode GetPodsByNodeNameFunc) *NoExecuteTaintManager {
eventBroadcaster := record.NewBroadcaster()
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "taint-controller"})
eventBroadcaster.StartLogging(klog.Infof)
eventBroadcaster.StartStructuredLogging(0)
if c != nil {
klog.V(0).Infof("Sending events to api server.")
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.CoreV1().Events("")})