From d9b941b7827961c0e1a6ba488edfc8ba88e0611d Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Thu, 18 May 2023 15:28:59 +0800 Subject: [PATCH] Remove undesired verbose fields from log The if and else branches have the exactly same code, which looks confusing and doesn't make sense. According to the comment, the else branch should log the error and podUID only. Signed-off-by: Quan Tian --- pkg/kubelet/pleg/evented.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/pleg/evented.go b/pkg/kubelet/pleg/evented.go index 5c74db03c2b..cbca33f394c 100644 --- a/pkg/kubelet/pleg/evented.go +++ b/pkg/kubelet/pleg/evented.go @@ -229,7 +229,7 @@ func (e *EventedPLEG) processCRIEvents(containerEventsResponseCh chan *runtimeap if klog.V(6).Enabled() { klog.ErrorS(err, "Evented PLEG: error generating pod status from the received event", "podUID", podID, "podStatus", status) } else { - klog.ErrorS(err, "Evented PLEG: error generating pod status from the received event", "podUID", podID, "podStatus", status) + klog.ErrorS(err, "Evented PLEG: error generating pod status from the received event", "podUID", podID) } } else { if klogV := klog.V(6); klogV.Enabled() {