You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2018/10/29 18:46:24 UTC
qpid-jms git commit: QPIDJMS-423 Log only the host and port data from
the URI on connect
Repository: qpid-jms
Updated Branches:
refs/heads/master d96734e0f -> abc75a35e
QPIDJMS-423 Log only the host and port data from the URI on connect
Update the connection event handler to log only the on-query portion of
the URI when processing the event.
This closes #23
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/abc75a35
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/abc75a35
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/abc75a35
Branch: refs/heads/master
Commit: abc75a35e22fdfde95511b78d2b020c303bb31a8
Parents: d96734e
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Oct 29 14:45:36 2018 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Oct 29 14:45:36 2018 -0400
----------------------------------------------------------------------
.../src/main/java/org/apache/qpid/jms/JmsConnection.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/abc75a35/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
index a3537e3..b4e2682 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
@@ -18,6 +18,7 @@ package org.apache.qpid.jms;
import java.io.IOException;
import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -86,6 +87,7 @@ import org.apache.qpid.jms.util.MessageQueue;
import org.apache.qpid.jms.util.PriorityMessageQueue;
import org.apache.qpid.jms.util.QpidJMSThreadFactory;
import org.apache.qpid.jms.util.ThreadPoolUtils;
+import org.apache.qpid.jms.util.URISupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -1322,7 +1324,12 @@ public class JmsConnection implements AutoCloseable, Connection, TopicConnection
@Override
public void onConnectionEstablished(final URI remoteURI) {
- LOG.info("Connection {} connected to remote Broker: {}", connectionInfo.getId(), remoteURI);
+ try {
+ LOG.info("Connection {} connected to remote Broker: {}", connectionInfo.getId(), URISupport.removeQuery(remoteURI));
+ } catch (URISyntaxException e) {
+ LOG.info("Connection {} connected to remote Broker: {}", connectionInfo.getId());
+ }
+
setMessageFactory(provider.getMessageFactory());
connectionInfo.setConnectedURI(provider.getRemoteURI());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org