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 2015/01/21 00:54:49 UTC
qpid-jms git commit: Update the trace bytes to log in hex dumps.
Repository: qpid-jms
Updated Branches:
refs/heads/master 44a422fd6 -> 89ca529eb
Update the trace bytes to log in hex dumps.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/89ca529e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/89ca529e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/89ca529e
Branch: refs/heads/master
Commit: 89ca529ebdb0df53946ec3d11b8d68023049d7f4
Parents: 44a422f
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Jan 20 18:54:44 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Jan 20 18:54:44 2015 -0500
----------------------------------------------------------------------
.../apache/qpid/jms/provider/amqp/AmqpProvider.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/89ca529e/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
index 3c3a470..cd068ef 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java
@@ -17,6 +17,7 @@
package org.apache.qpid.jms.provider.amqp;
import io.netty.buffer.ByteBuf;
+import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.util.ReferenceCountUtil;
@@ -783,15 +784,15 @@ public class AmqpProvider implements Provider, TransportListener {
while (!done) {
ByteBuffer toWrite = protonTransport.getOutputBuffer();
if (toWrite != null && toWrite.hasRemaining()) {
- // TODO - Get Bytes in a readable form
+ byte[] bytes = new byte[toWrite.remaining()];
+ toWrite.get(bytes);
+ ByteBuf copy = Unpooled.wrappedBuffer(bytes);
+
if (isTraceBytes()) {
- TRACE_BYTES.info("Sending: {}", toWrite.toString());
+ TRACE_BYTES.info("Sending: {}", ByteBufUtil.hexDump(copy));
}
- byte[] copy = new byte[toWrite.remaining()];
- toWrite.get(copy);
-
- transport.send(Unpooled.wrappedBuffer(copy));
+ transport.send(copy);
protonTransport.outputConsumed();
} else {
done = true;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org