This is an automated email from the ASF dual-hosted git repository.
cshannon pushed a commit to branch activemq-5.19.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.19.x by this push:
new 1970315790 [AMQ-9288] Fix TransportConnection logger to include
exception message on Async Error (#2062)
1970315790 is described below
commit 19703157905c4e5a80d882123f99a8ea4b52563a
Author: Trevor Dyck <[email protected]>
AuthorDate: Mon Jun 8 12:25:33 2026 -0700
[AMQ-9288] Fix TransportConnection logger to include exception message on
Async Error (#2062)
Backport of AMQ-9288 (commit b751428eb, PR #1038) to the 5.19.x branch.
When an async error occurs and DEBUG is not enabled, TransportConnection
logged at WARN with a message string that had no '{}' placeholder while
passing e.getMessage() as a parameter. SLF4J therefore dropped the
argument and logged only the bare text "Async error occurred" with no
detail, making the failure undiagnosable at the default log level.
Add the '{}' placeholder so the exception message is included, matching
the fix already present on the 6.x branches. The Throwable is
intentionally not passed (full stack traces at WARN were deliberately
removed in AMQ-8548); DEBUG continues to log the full trace.
---
.../src/main/java/org/apache/activemq/broker/TransportConnection.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
index 9f44caab2c..6bed99d726 100644
---
a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
+++
b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
@@ -312,7 +312,7 @@ public class TransportConnection implements Connection,
Task, CommandVisitor {
if (SERVICELOG.isDebugEnabled()) {
SERVICELOG.debug("Async error occurred: {}",
e.getMessage(), e);
} else {
- SERVICELOG.warn("Async error occurred", e.getMessage());
+ SERVICELOG.warn("Async error occurred: {}",
e.getMessage());
}
ConnectionError ce = new ConnectionError();
ce.setException(e);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact