From 5919613b3cbb8043ea54622cd7f176e228ef5b58 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 460d8c0d1e..7b5dfa129c 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 @@ -367,6 +367,9 @@ public class LockRegistryLeaderInitiator implements SmartLifecycle, DisposableBe } return null; } + else if (logger.isDebugEnabled()) { + logger.debug("Error acquiring the lock. " + (isRunning() ? "Retrying..." : ""), e); + } } } }