From 8693e0c0ff586da9f4f17180244f9dd288feb942 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Mon, 16 Sep 2024 17:41:34 +0800 Subject: [PATCH] chore: improve an error log Signed-off-by: Shuo Wu --- controller/volume_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/volume_controller.go b/controller/volume_controller.go index af658367e9..57bac3af98 100644 --- a/controller/volume_controller.go +++ b/controller/volume_controller.go @@ -749,7 +749,7 @@ func (c *VolumeController) ReconcileEngineReplicaState(v *longhorn.Volume, es ma } else { after, err := util.TimestampAfterTimestamp(transitionTime, r.Spec.LastHealthyAt) if err != nil { - log.Errorf("Failed to check if replica %v transitioned to mode %v after it was last healthy", r.Name, mode) + log.WithError(err).Errorf("Failed to check if replica %v transitioned to mode %v after it was last healthy", r.Name, mode) } if after || err != nil { r.Spec.LastHealthyAt = now