From 523d1db09a6bac63b9fa9b92c87ea14738ea8889 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 12 Dec 2024 11:18:07 +0800 Subject: [PATCH] fix log message for delete operation Signed-off-by: Di Xu --- yacht.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yacht.go b/yacht.go index bbcfdd9..031597c 100644 --- a/yacht.go +++ b/yacht.go @@ -160,7 +160,11 @@ func (c *Controller) applyEnqueueFilterFunc(oldObj, newObj interface{}, operatio return false } - utils.DepthLogging(nil, "info", fmt.Sprintf("[%s] enqueue resource", operation), oldObj) + if operation == cache.Deleted { + utils.DepthLogging(nil, "info", fmt.Sprintf("[%s] enqueue resource", operation), oldObj) + } else { + utils.DepthLogging(nil, "info", fmt.Sprintf("[%s] enqueue resource", operation), newObj) + } return true }