From 12301f7fae4e3715d486d142329dc4b56893be98 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Tue, 20 Mar 2018 17:13:33 -0400 Subject: [PATCH] LockRegistryLeaderInitiator: Add DEBUG for errors For better traceability for errors during lock acquiring add DEBUG logging message in the `catch` block before returning back to the main loop for the next acquiring attempt **Cherry-pick to 5.0.x and 4.3.x** --- .../support/leader/LockRegistryLeaderInitiator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java b/spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java index 9295c7854d..12b1b98f90 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java @@ -400,6 +400,9 @@ public class LockRegistryLeaderInitiator implements SmartLifecycle, DisposableBe } return null; } + else if (logger.isDebugEnabled()) { + logger.debug("Error acquiring the lock. " + (isRunning() ? "Retrying..." : ""), e); + } } } }