From 4d714ed2c2da1aeffafe45ca083422aa6e86c7cf Mon Sep 17 00:00:00 2001 From: xingming01 <121333562+xingming01@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:38:57 +0800 Subject: [PATCH] Fix: Optimize the webhook log format (#5652) Co-authored-by: caoxingming --- .../v1alpha2/componentdefinition/mutating_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/webhook/core.oam.dev/v1alpha2/componentdefinition/mutating_handler.go b/pkg/webhook/core.oam.dev/v1alpha2/componentdefinition/mutating_handler.go index c6d003da6..90d9a8aa3 100644 --- a/pkg/webhook/core.oam.dev/v1alpha2/componentdefinition/mutating_handler.go +++ b/pkg/webhook/core.oam.dev/v1alpha2/componentdefinition/mutating_handler.go @@ -60,7 +60,7 @@ func (h *MutatingHandler) Handle(ctx context.Context, req admission.Request) adm } // mutate the object if err := h.Mutate(obj); err != nil { - klog.Error(err, "failed to mutate the componentDefinition", "name", obj.Name) + klog.ErrorS(err, "failed to mutate the componentDefinition", "name", obj.Name) return admission.Errored(http.StatusBadRequest, err) }