diff --git a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsIotHubConnection.java b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsIotHubConnection.java index 5f2d3f3a28..c98e142b5e 100644 --- a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsIotHubConnection.java +++ b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsIotHubConnection.java @@ -337,11 +337,13 @@ public Integer sendMessage(Message message) byte[] msgData = new byte[1024]; int length; + logger.LogInfo("Started encoding of message - entering in while loop, method name is %s ", logger.getMethodName()); while (true) { try { length = message.encode(msgData, 0, msgData.length); + logger.LogInfo("Completed encoding of message, length is %s - breaking the while loop to come out, method name is %s ", length, logger.getMethodName()); break; } catch (BufferOverflowException e)