mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
Use Structured Logging For Unknown Strategy Log Message
Always use structured logging. Therefore update klog.Errorf() to instead use klog.ErrorS(). Here is an example of the new log message. E0428 23:58:57.048912 586 descheduler.go:145] "skipping strategy" err="unknown strategy name" strategy=ASDFPodLifeTime
This commit is contained in:
@@ -142,7 +142,7 @@ func RunDeschedulerStrategies(ctx context.Context, rs *options.DeschedulerServer
|
|||||||
f(ctx, rs.Client, strategy, nodes, podEvictor)
|
f(ctx, rs.Client, strategy, nodes, podEvictor)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
klog.Errorf("Unknown strategy name '%s', skipping", name)
|
klog.ErrorS(fmt.Errorf("unknown strategy name"), "skipping strategy", "strategy", name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user