You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/03/04 20:43:36 UTC
[activemq] branch activemq-5.15.x updated: [AMQ-7346] Improve
logging of the network connector
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-5.15.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.15.x by this push:
new ae8df49 [AMQ-7346] Improve logging of the network connector
ae8df49 is described below
commit ae8df4945079108ae5c411216777eb54e8f02d27
Author: jbonofre <jb...@apache.org>
AuthorDate: Wed Mar 4 17:54:37 2020 +0100
[AMQ-7346] Improve logging of the network connector
(cherry picked from commit 3c4a644f3d6e5a21dee907928aa611902312df16)
---
.../activemq/network/DemandForwardingBridgeSupport.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
index ca165c0..5ca2d34 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
@@ -222,7 +222,8 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
@Override
public void onException(IOException error) {
if (!futureLocalBrokerInfo.isDone()) {
- LOG.info("error with pending local brokerInfo on: " + localBroker, error);
+ LOG.info("Error with pending local brokerInfo on: {} ({})", localBroker, error.getMessage());
+ LOG.debug("Peer error: ", error);
futureLocalBrokerInfo.cancel(true);
return;
}
@@ -241,7 +242,8 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
@Override
public void onException(IOException error) {
if (!futureRemoteBrokerInfo.isDone()) {
- LOG.info("error with pending remote brokerInfo on: " + remoteBroker, error);
+ LOG.info("Error with pending remote brokerInfo on: {} ({})", remoteBroker, error.getMessage());
+ LOG.debug("Peer error: ", error);
futureRemoteBrokerInfo.cancel(true);
return;
}
@@ -642,13 +644,9 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
public void serviceRemoteException(Throwable error) {
if (!disposed.get()) {
if (error instanceof SecurityException || error instanceof GeneralSecurityException) {
- LOG.error("Network connection between {} and {} shutdown due to a remote error: {}", new Object[]{
- localBroker, remoteBroker, error
- });
+ LOG.error("Network connection between {} and {} shutdown due to a remote error: {}", localBroker, remoteBroker, error.toString());
} else {
- LOG.warn("Network connection between {} and {} shutdown due to a remote error: {}", new Object[]{
- localBroker, remoteBroker, error
- });
+ LOG.warn("Network connection between {} and {} shutdown due to a remote error: {}", localBroker, remoteBroker, error.toString());
}
LOG.debug("The remote Exception was: {}", error, error);
brokerService.getTaskRunnerFactory().execute(new Runnable() {