Skip to content

Commit b0a8ce2

Browse files
committed
fix: log actual error message in the reconcile error
Looks like the logger extracts only stacktrace from the error passed as the first argument. Additionally log error as the separate field. Signed-off-by: Artem Chernyshev <[email protected]>
1 parent 8c0eba4 commit b0a8ce2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/taloscontrolplane_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ func (r *TalosControlPlaneReconciler) reconcile(ctx context.Context, cluster *cl
240240
}
241241

242242
if result.RequeueAfter != 0 {
243-
r.Log.Error(err, "reconcile failed", "requeue after", result.RequeueAfter.String())
243+
if err != nil {
244+
r.Log.Error(err, "reconcile failed", "requeue after", result.RequeueAfter.String(), "error", err.Error())
245+
}
244246

245247
return result, nil
246248
}

0 commit comments

Comments
 (0)