Skip to content

Commit

Permalink
Fix excessive trace logging in the machine health check controller
Browse files Browse the repository at this point in the history
  • Loading branch information
cnmcavoy committed Sep 13, 2023
1 parent e92e712 commit 49c9525
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (r *Reconciler) getTargetsFromMHC(ctx context.Context, logger logr.Logger,

targets := []healthCheckTarget{}
for k := range machines {
logger.WithValues("Machine", klog.KObj(&machines[k]))
logger := logger.WithValues("Machine", klog.KObj(&machines[k]))
skip, reason := shouldSkipRemediation(&machines[k])
if skip {
logger.Info("skipping remediation", "reason", reason)
Expand Down Expand Up @@ -286,7 +286,7 @@ func (r *Reconciler) healthCheckTargets(targets []healthCheckTarget, logger logr
var healthy []healthCheckTarget

for _, t := range targets {
logger = logger.WithValues("Target", t.string())
logger := logger.WithValues("Target", t.string())
logger.V(3).Info("Health checking target")
needsRemediation, nextCheck := t.needsRemediation(logger, timeoutForMachineToHaveNode)

Expand Down

0 comments on commit 49c9525

Please sign in to comment.