From 7dca720f93dff4b6db578259c310358f6f9067e6 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Thu, 23 Feb 2006 12:28:45 +0000 Subject: [PATCH] added better debug logging git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@380104 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/transport/WireFormatNegotiator.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java b/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java index 780f63e051..c812831a65 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java @@ -23,12 +23,16 @@ import org.activeio.command.WireFormat; import org.apache.activemq.command.Command; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.openwire.OpenWireFormat; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch; public class WireFormatNegotiator extends TransportFilter { + private static final Log log = LogFactory.getLog(WireFormatNegotiator.class); + private final WireFormat wireFormat; private final int minimumVersion; @@ -79,6 +83,10 @@ public class WireFormatNegotiator extends TransportFilter { public void onCommand(Command command) { if( command.isWireFormatInfo() ) { WireFormatInfo info = (WireFormatInfo) command; + if (log.isDebugEnabled()) { + log.debug("Received WireFormat: " + info + " with version: 0x" + Integer.toString(info.getVersion(), 16)); + } + if( !info.isValid() ) { commandListener.onException(new IOException("Remote wire format magic is invalid")); } else if( info.getVersion() < minimumVersion ) {