mirror of
https://github.com/apache/activemq.git
synced 2025-02-16 23:16:52 +00:00
AMQ-4706 - ensure we log the first warn and include the failure reason
This commit is contained in:
parent
d8c939a4bd
commit
2b64b7b04f
@ -1096,9 +1096,9 @@ public class FailoverTransport implements CompositeTransport {
|
||||
}
|
||||
|
||||
int warnInterval = getWarnAfterReconnectAttempts();
|
||||
if (warnInterval > 0 && (connectFailures % warnInterval) == 0) {
|
||||
LOG.warn("Failed to connect to {} after: {} attempt(s) continuing to retry.",
|
||||
uris, connectFailures);
|
||||
if (warnInterval > 0 && (connectFailures == 1 || (connectFailures % warnInterval) == 0)) {
|
||||
LOG.warn("Failed to connect to {} after: {} attempt(s) with {}, continuing to retry.",
|
||||
uris, connectFailures, (failure == null ? "?" : failure.getLocalizedMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user