From ef48efc736cf543ea0582dffdb19b614daa33f34 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 4 Jul 2023 14:18:49 +0200 Subject: [PATCH] scheduler dynamicresources: minor logging improvements This makes some complex values a bit more readable. --- .../framework/plugins/dynamicresources/dynamicresources.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 8ec90bae497..9ac711ae18a 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -169,7 +169,7 @@ func (d *stateData) publishPodSchedulingContexts(ctx context.Context, clientset } if loggerV := logger.V(6); loggerV.Enabled() { // At a high enough log level, dump the entire object. - loggerV.Info(msg, "podSchedulingCtxDump", schedulingCtx) + loggerV.Info(msg, "podSchedulingCtxDump", klog.Format(schedulingCtx)) } else { logger.V(5).Info(msg, "podSchedulingCtx", klog.KObj(schedulingCtx)) } @@ -577,7 +577,7 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta sort.Strings(schedulingCtx.Spec.PotentialNodes) state.storePodSchedulingContexts(schedulingCtx) } - logger.V(5).Info("all potential nodes already set", "pod", klog.KObj(pod), "potentialnodes", nodes) + logger.V(5).Info("all potential nodes already set", "pod", klog.KObj(pod), "potentialnodes", klog.KObjSlice(nodes)) return nil }