[AMQ-9288] Fix TransportConnection logger to include exception message on Async Error (5.19.x backport)#2062
Open
trex-amazon wants to merge 1 commit into
Conversation
…e on Async Error Backport of AMQ-9288 (commit b751428, PR apache#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of AMQ-9288 (commit
b751428eb, #1038) to theactivemq-5.19.xbranch.When an async error occurs and DEBUG logging is not enabled,
TransportConnectionlogged at WARN with a message that had no{}placeholder, while passinge.getMessage()as an argument:SLF4J drops the unreferenced argument, so the broker logs only the bare text
Async error occurredwith no detail — making the failure undiagnosable at the default log level. This was reported by an Amazon MQ for ActiveMQ user on AWS re:Post: "Async error occurred — without trace".The fix already exists on the
main,6.0.x,6.1.x, and6.2.xbranches via AMQ-9288, but was never backported to the still-supported5.18.x/5.19.xmaintenance branches.Change
Adds the
{}placeholder so the exception message is included at WARN. TheThrowableis intentionally not passed — full stack traces at WARN were deliberately removed in AMQ-8548; the DEBUG branch one line above continues to log the full trace.Testing
mvn -DskipTests installof the full 5.19.x reactor compiles cleanly on JDK 11. This mirrors the original AMQ-9288 commit exactly, which likewise changed only this line and added no test.