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:42:49 UTC
[activemq] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/master by this push:
new 3c4a644 [AMQ-7346] Improve logging of the network connector
new 7435d7b Merge pull request #499 from jbonofre/AMQ-7346
3c4a644 is described below
commit 3c4a644f3d6e5a21dee907928aa611902312df16
Author: jbonofre <jb...@apache.org>
AuthorDate: Wed Mar 4 17:54:37 2020 +0100
[AMQ-7346] Improve logging of the network connector
---
.../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 5b8344c..eca5a5a 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() {