Logging updated
[openflowjava.git] / simple-client / src / main / java / org / opendaylight / openflowjava / protocol / impl / clients / SimpleClientHandler.java
index 9c7ae5dbad8da936a1620e9cbb145c3cd795ad50..6e3540dd3c19b75c9cfe37fc6823e0b4f66d28b5 100644 (file)
@@ -45,17 +45,17 @@ public class SimpleClientHandler extends ChannelInboundHandlerAdapter {
         if (LOGGER.isDebugEnabled()) {
             LOGGER.debug("<< " + ByteBufUtils.byteBufToHexString(bb));
         }
-        int length = bb.getUnsignedShort(LENGTH_INDEX_IN_HEADER);
-        LOGGER.info("SimpleClientHandler - start of read");
+        int length = bb.getUnsignedShort(bb.readerIndex() + LENGTH_INDEX_IN_HEADER);
+        LOGGER.trace("SimpleClientHandler - start of read");
         byte[] message = new byte[length];
         bb.readBytes(message);
         scenarioHandler.addOfMsg(message);
-        LOGGER.info("end of read");
+        LOGGER.trace("end of read");
     }
 
     @Override
     public void channelActive(ChannelHandlerContext ctx) throws Exception {
-        LOGGER.info("Client is active");
+        LOGGER.debug("Client is active");
         if (isOnlineFuture != null) {
             isOnlineFuture.set(true);
             isOnlineFuture = null;