diff --git a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClient.java b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClient.java index b52ae2593d..67e3337982 100644 --- a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClient.java +++ b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClient.java @@ -86,6 +86,7 @@ protected enum IotHubClientState protected ScheduledExecutorService taskScheduler; protected IotHubClientState state; protected long RECEIVE_PERIOD_MILLIS; + protected CustomLogger logger; /** * Constructor that takes a connection string as an argument. @@ -153,6 +154,8 @@ else if (attr.startsWith(SHARED_ACCESS_TOKEN_ATTRIBUTE)) } initIotHubClient(hostname, deviceId, sharedAccessKey, sharedAccessToken, protocol); + this.logger = new CustomLogger(this.getClass()); + logger.LogInfo("DeviceClient object is created successfully, method name is %s ", logger.getMethodName()); } /** @@ -251,6 +254,7 @@ public void sendEventAsync(Message message, throw new IllegalArgumentException("Cannot send message 'null'."); } + logger.LogInfo("Message with messageid %s along with callback and callbackcontext is added to the queue, method name is %s ", message.getMessageId(), logger.getMethodName()); // Codes_SRS_DEVICECLIENT_11_006: [The function shall add the message, with its associated callback and callback context, to the transport.] transport.addMessage(message, callback, callbackContext); } @@ -376,6 +380,7 @@ protected DeviceClient() private void setOption_SetMinimumPollingInterval(Object value) { + logger.LogInfo("Setting MinimumPollingInterval as %s milliseconds, method name is %s ", value, logger.getMethodName()); if (!value.equals(null)) { if (this.state != IotHubClientState.CLOSED) { throw new IllegalStateException("setOption " + SET_MINIMUM_POLLING_INTERVAL + @@ -396,6 +401,7 @@ private void setOption_SetMinimumPollingInterval(Object value) private void setOption_SetCertificatePath(Object value) { + logger.LogInfo("Setting CertificatePath as %s, method name is %s ", value, logger.getMethodName()); if (this.state != IotHubClientState.CLOSED) { throw new IllegalStateException("setOption " + SET_CERTIFICATE_PATH + "only works when the transport is closed"); @@ -410,6 +416,7 @@ private void setOption_SetCertificatePath(Object value) private void setOption_SetSASTokenExpiryTime(Object value) { + logger.LogInfo("Setting SASTokenExpiryTime as %s seconds, method name is %s ", value, logger.getMethodName()); if (!value.equals(null)) { //**Codes_SRS_DEVICECLIENT_25_009: [**"SetSASTokenExpiryTime" should have value type long**.]** long validTimeInSeconds; @@ -502,6 +509,7 @@ public void setOption(String optionName, Object value) { setOption_SetMinimumPollingInterval(value); } else { + logger.LogError("optionName is unknown = %s for %s, method name is %s ", optionName, this.transport.getClass(), logger.getMethodName()); // Codes_SRS_DEVICECLIENT_02_001: [If optionName is null or not an option // handled by the client, then it shall throw IllegalArgumentException.] throw new IllegalArgumentException("optionName is unknown = " + optionName @@ -519,6 +527,7 @@ public void setOption(String optionName, Object value) { setOption_SetCertificatePath(value); } else { + logger.LogError("optionName is unknown = %s for %s, method name is %s ", optionName, this.transport.getClass(), logger.getMethodName()); // Codes_SRS_DEVICECLIENT_02_001: [If optionName is null or not an option handled by the // client, then it shall throw IllegalArgumentException.] throw new IllegalArgumentException("optionName is unknown = " + optionName + @@ -535,6 +544,7 @@ public void setOption(String optionName, Object value) { setOption_SetSASTokenExpiryTime(value); } else { + logger.LogError("optionName is unknown = %s for %s, method name is %s ", optionName, this.transport.getClass(), logger.getMethodName()); // Codes_SRS_DEVICECLIENT_02_001: [If optionName is null or not an option handled by the // client, then it shall throw IllegalArgumentException.] throw new IllegalArgumentException("optionName is unknown = " + optionName + diff --git a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClientConfig.java b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClientConfig.java index 01001c28b1..8f72e09650 100644 --- a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClientConfig.java +++ b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/DeviceClientConfig.java @@ -40,6 +40,7 @@ public final class DeviceClientConfig /** The context to be passed in to the message callback. */ protected Object messageContext; + protected CustomLogger logger; /** * Constructor. * @@ -79,7 +80,8 @@ public DeviceClientConfig(String iotHubHostname, String deviceId, this.deviceKey = deviceKey; // Codes_SRS_DEVICECLIENTCONFIG_25_017: [**The constructor shall save sharedAccessToken.**] ** this.sharedAccessToken = sharedAccessToken; - + this.logger = new CustomLogger(this.getClass()); + logger.LogInfo("DeviceClientConfig object is created successfully with IotHubName=%s, deviceID=%s , method name is %s ", this.iotHubName, this.deviceId, logger.getMethodName()); } /** diff --git a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java index f34fc3ac08..326a08ec70 100644 --- a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java +++ b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java @@ -248,6 +248,7 @@ public void setProperty(String name, String value) { this.properties.remove(messageProperty); } + logger.LogInfo("Setting message property with name=%s and value=%s, method name is %s ", name, value, logger.getMethodName()); this.properties.add(new MessageProperty(name, value)); } @@ -372,6 +373,6 @@ public void setExpiryTime(long timeOut) { long currentTime = System.currentTimeMillis(); this.expiryTime = currentTime + timeOut; - logger.LogInfo("The message with messageid %s has expiry time as %s, method name is %s ", this.getMessageId(), new Date(this.expiryTime), logger.getMethodName()); + logger.LogInfo("The message with messageid %s has expiry time as %s milliseconds and the message will expire on %s, method name is %s ", this.getMessageId(), timeOut, new Date(this.expiryTime), logger.getMethodName()); } } \ No newline at end of file diff --git a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/MessageProperty.java b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/MessageProperty.java index 5be59f500c..ebfa395373 100644 --- a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/MessageProperty.java +++ b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/MessageProperty.java @@ -41,7 +41,7 @@ public final class MessageProperty { protected final String name; /** The property value. */ protected final String value; - + protected CustomLogger logger; /** * Constructor. * @@ -54,29 +54,35 @@ public final class MessageProperty { * A message property name cannot be one of the reserved property names. */ public MessageProperty(String name, String value) { + this.logger = new CustomLogger(this.getClass()); if (name == null) { + logger.LogError("Property argument 'name' cannot be null, method name is %s ", logger.getMethodName()); throw new IllegalArgumentException("Property argument 'name' cannot be null."); } if (value == null) { + logger.LogError("Property argument 'value' cannot be null, method name is %s ", logger.getMethodName()); throw new IllegalArgumentException("Property argument 'value' cannot be null."); } // Codes_SRS_MESSAGEPROPERTY_11_002: [If the name contains a character that is not in US-ASCII printable characters or is one of: ()<>@,;:\"/[]?={} (space) (horizontal tab), the function shall throw an IllegalArgumentException.] if (!usesValidChars(name)) { - String errMsg = String.format("%s is not a valid IoT Hub message property name.\n", name); + logger.LogError("%s is not a valid IoT Hub message property name, method name is %s ", name, logger.getMethodName()); + String errMsg = String.format("%s is not a valid IoT Hub message property name.\n", name); throw new IllegalArgumentException(errMsg); } // Codes_SRS_MESSAGEPROPERTY_11_008: [If the name is a reserved property name, the function shall throw an IllegalArgumentException.] if (RESERVED_PROPERTY_NAMES.contains(name)) { - String errMsg = String.format("%s is a reserved IoT Hub message property name.\n", name); + logger.LogError("%s is a reserved IoT Hub message property name, method name is %s ", name, logger.getMethodName()); + String errMsg = String.format("%s is a reserved IoT Hub message property name.\n", name); throw new IllegalArgumentException(errMsg); } // Codes_SRS_MESSAGEPROPERTY_11_003: [If the value contains a character that is not in US-ASCII printable characters or is one of: ()<>@,;:\"/[]?={} (space) (horizontal tab), the function shall throw an IllegalArgumentException.] if (!usesValidChars(value)) { + logger.LogError("%s is a reserved IoT Hub message property name, method name is %s ", name, logger.getMethodName()); String errMsg = String.format("%s is not a valid IoT Hub message property value.\n", value); throw new IllegalArgumentException(errMsg); } 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 c66678a8e4..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) @@ -354,15 +356,17 @@ public Integer sendMessage(Message message) byte[] tag = String.valueOf(this. nextTag++).getBytes(); Delivery dlv = sender.delivery(tag); + logger.LogInfo("Attempting to send the message using the sender link, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_018: [The function shall attempt to send the message using the sender link.] sender.send(msgData, 0, length); - + + logger.LogInfo("Advancing the sender link, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_019: [The function shall advance the sender link.] sender.advance(); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_020: [The function shall set the delivery hash to the value returned by the sender link.] deliveryHash = dlv.hashCode(); - + logger.LogInfo("Delivery hash returned by the sender link %s, method name is %s ", deliveryHash, logger.getMethodName()); } // Codes_SRS_AMQPSIOTHUBCONNECTION_15_021: [The function shall return the delivery hash.] @@ -384,6 +388,7 @@ public Boolean sendMessageResult(AmqpsMessage message, IotHubMessageResult resul { try { + logger.LogInfo("Acknowledgement for received message is %s, method name is %s ", result.name(), logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_023: [If the message result is COMPLETE, ABANDON, or REJECT, // the function shall acknowledge the last message with acknowledgement type COMPLETE, ABANDON, or REJECT respectively.] switch (result) @@ -399,6 +404,7 @@ public Boolean sendMessageResult(AmqpsMessage message, IotHubMessageResult resul break; default: // should never happen. + logger.LogError("Invalid IoT Hub message result (%s), method name is %s ", result.name(), logger.getMethodName()); throw new IllegalStateException("Invalid IoT Hub message result."); } @@ -545,23 +551,26 @@ public void onDelivery(Event event) logger.LogDebug("Entered in method %s", logger.getMethodName()); if(event.getLink().getName().equals(receiveTag)) { + logger.LogInfo("Reading the receiver link, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_034: [If this link is the Receiver link, the event handler shall get the Receiver and Delivery (Proton) objects from the event.] Receiver receiveLink = (Receiver) event.getLink(); Delivery delivery = receiveLink.current(); if (delivery.isReadable() && !delivery.isPartial()) { + logger.LogInfo("Reading the received buffer, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_035: [The event handler shall read the received buffer.] int size = delivery.pending(); byte[] buffer = new byte[size]; int read = receiveLink.recv(buffer, 0, buffer.length); receiveLink.advance(); - + logger.LogInfo("Reading the received buffer completed, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_036: [The event handler shall create an AmqpsMessage object from the decoded buffer.] AmqpsMessage msg = new AmqpsMessage(); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_037: [The event handler shall set the AmqpsMessage Deliver (Proton) object.] msg.setDelivery(delivery); + logger.LogInfo("Decoding the received message , method name is %s ", logger.getMethodName()); msg.decode(buffer, 0, read); - + logger.LogInfo("Decoding the received message completed , method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_049: [All the listeners shall be notified that a message was received from the server.] this.messageReceivedFromServer(msg); } @@ -571,12 +580,15 @@ public void onDelivery(Event event) //Sender specific section for dispositions it receives if(event.getType() == Event.Type.DELIVERY) { + logger.LogInfo("Reading the delivery event in Sender link, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_038: [If this link is the Sender link and the event type is DELIVERY, the event handler shall get the Delivery (Proton) object from the event.] Delivery d = event.getDelivery(); DeliveryState remoteState = d.getRemoteState(); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_039: [The event handler shall note the remote delivery state and use it and the Delivery (Proton) hash code to inform the AmqpsIotHubConnection of the message receipt.] boolean state = remoteState.equals(Accepted.getInstance()); + logger.LogInfo("Is state of remote Delivery COMPLETE ? %s, method name is %s ", state, logger.getMethodName()); + logger.LogInfo("Inform listener that a message has been sent to IoT Hub along with remote state, method name is %s ", logger.getMethodName()); //let any listener know that the message was received by the server for(ServerListener listener : listeners) { @@ -597,6 +609,7 @@ public void onLinkFlow(Event event) logger.LogDebug("Entered in method %s", logger.getMethodName()); // Codes_SRS_AMQPSIOTHUBCONNECTION_15_040: [The event handler shall save the remaining link credit.] this.linkCredit = event.getLink().getCredit(); + logger.LogDebug("The link credit value is %s, method name is %s", this.linkCredit, logger.getMethodName()); logger.LogDebug("Exited from method %s", logger.getMethodName()); } @@ -732,6 +745,7 @@ private void startReconnect() */ private void messageReceivedFromServer(AmqpsMessage msg) { + logger.LogInfo("All the listeners are informed that a message has been received, method name is %s ", logger.getMethodName()); for(ServerListener listener : listeners) { listener.messageReceived(msg); diff --git a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsTransport.java b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsTransport.java index e6ebaca125..73d34b0f03 100644 --- a/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsTransport.java +++ b/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsTransport.java @@ -192,7 +192,8 @@ public void sendMessages() throws IOException, IllegalStateException // Codes_SRS_AMQPSTRANSPORT_15_014: [The function shall attempt to send every message on its waiting list, one at a time.] while (!this.waitingMessages.isEmpty()) { - IotHubOutboundPacket packet = this.waitingMessages.remove(); + logger.LogInfo("Get the message from waiting message queue to be sent to IoT Hub, method name is %s ", logger.getMethodName()); + IotHubOutboundPacket packet = this.waitingMessages.remove(); Message message = packet.getMessage(); @@ -203,11 +204,13 @@ public void sendMessages() throws IOException, IllegalStateException // with the MESSAGE_EXPIRED status and add it to the callback list.] if (message.isExpired()) { + logger.LogInfo("Creating a callback for the expired message with MESSAGE_EXPIRED status, method name is %s ", logger.getMethodName()); IotHubCallbackPacket callbackPacket = new IotHubCallbackPacket(IotHubStatusCode.MESSAGE_EXPIRED, packet.getCallback(), packet.getContext()); this.callbackList.add(callbackPacket); } else { + logger.LogInfo("Converting the IoT Hub message into AmqpsMessage, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSTRANSPORT_15_036: [The function shall create a new Proton message from the IoTHub message.] MessageImpl protonMessage = iotHubMessageToProtonMessage(message); @@ -254,7 +257,7 @@ public void invokeCallbacks() throws IllegalStateException IotHubEventCallback callback = packet.getCallback(); Object context = packet.getContext(); - logger.LogInfo("Invoking the callback from the callback queue, method name is %s ", logger.getMethodName()); + logger.LogInfo("Invoking the callback function for sent message, IoT Hub responded to message with status %s, method name is %s ", status.name(), logger.getMethodName()); callback.execute(status, context); } } @@ -277,12 +280,14 @@ public void handleMessage() throws IllegalStateException logger.LogError("Cannot handle messages when AMQPS transport is closed, method name is %s ", logger.getMethodName()); throw new IllegalStateException("Cannot handle messages when AMQPS transport is closed."); } - + + logger.LogInfo("Get the callback function for the received message, method name is %s ", logger.getMethodName()); MessageCallback callback = this.config.getMessageCallback(); // Codes_SRS_AMQPSTRANSPORT_15_025: [If no callback is defined, the list of received messages is cleared.] if (callback == null) { + logger.LogError("Callback is not defined therefore response to IoT Hub cannot be generated. All received messages will be removed from receive message queue, method name is %s ", logger.getMethodName()); this.receivedMessages.clear(); return; } @@ -291,7 +296,9 @@ public void handleMessage() throws IllegalStateException // Codes_SRS_AMQPSTRANSPORT_15_024: [If no message was received from IotHub, the function shall return.] if (this.receivedMessages.size() > 0) { + logger.LogInfo("Consuming a message received from IoT Hub using receive message queue, method name is %s ", logger.getMethodName()); AmqpsMessage receivedMessage = this.receivedMessages.remove(); + logger.LogInfo("Converting the AmqpsMessage to IoT Hub message, method name is %s ", logger.getMethodName()); Message message = protonMessageToIoTHubMessage(receivedMessage); // set messageId from messageId property if it exists. Fix for GitHub issue #990 @@ -300,17 +307,16 @@ public void handleMessage() throws IllegalStateException message.setMessageId(message.getProperty("messageId")); } - + logger.LogInfo("Executing the callback function for received message, method name is %s ", logger.getMethodName()); // Codes_SRS_AMQPSTRANSPORT_15_026: [The function shall invoke the callback on the message.] IotHubMessageResult result = callback.execute(message, this.config.getMessageContext()); // Codes_SRS_AMQPSTRANSPORT_15_027: [The function shall return the message result (one of COMPLETE, ABANDON, or REJECT) to the IoT Hub.] Boolean ackResult = this.connection.sendMessageResult(receivedMessage, result); - logger.LogInfo("Status of message with hashcode %s received from IotHub is %s, method name is %s ", receivedMessage.hashCode(), result.name(), logger.getMethodName()); // Codes_SRS_AMQPSTRANSPORT_15_028: [If the result could not be sent to IoTHub, the message shall be put back in the received messages queue to be processed again.] if (!ackResult) { - logger.LogWarn("Status of message with hashcode %s is not available. Message has been added in the queue to be processed again, method name is %s", receivedMessage.hashCode(), logger.getMethodName()); + logger.LogWarn("Callback did not return a response for IoT Hub. Message has been added in the queue to be processed again, method name is %s", logger.getMethodName()); receivedMessages.add(receivedMessage); } } @@ -331,7 +337,7 @@ public void messageSent(Integer messageHash, Boolean deliveryState) IotHubOutboundPacket packet = inProgressMessages.remove(messageHash); if (deliveryState) { - logger.LogInfo("Message with messageid %s has been delivered to IoTHub, method name is %s ", packet.getMessage().getMessageId(), logger.getMethodName()); + logger.LogInfo("Message with messageid %s has been successfully delivered to IoTHub, adding a callback to callbacklist with IotHubStatusCode.OK_EMPTY, method name is %s ", packet.getMessage().getMessageId(), logger.getMethodName()); // Codes_SRS_AMQPSTRANSPORT_15_030: [If the message was successfully delivered, // its callback is added to the list of callbacks to be executed.] IotHubCallbackPacket callbackPacket = new IotHubCallbackPacket(IotHubStatusCode.OK_EMPTY, packet.getCallback(), packet.getContext()); @@ -396,6 +402,7 @@ public boolean isEmpty() */ private Message protonMessageToIoTHubMessage(MessageImpl protonMsg) { + logger.LogInfo("Started converting AmpqsMessage into IoT Hub message, method name is %s ", logger.getMethodName()); Data d = (Data) protonMsg.getBody(); Binary b = d.getValue(); byte[] msgBody = new byte[b.getLength()]; @@ -403,7 +410,7 @@ private Message protonMessageToIoTHubMessage(MessageImpl protonMsg) buffer.get(msgBody); Message msg = new Message(msgBody); - + logger.LogInfo("Content of received message is %s, method name is %s ", new String(msg.getBytes(), Message.DEFAULT_IOTHUB_MESSAGE_CHARSET), logger.getMethodName()); Properties properties = protonMsg.getProperties(); //Call all of the getters for the Proton message Properties and set those properties //in the IoT Hub message properties if they exist. @@ -427,11 +434,13 @@ private Message protonMessageToIoTHubMessage(MessageImpl protonMsg) } catch (IllegalAccessException e) { + logger.LogError(e); System.err.println("Attempted to access private or protected member of class during message conversion."); } catch (InvocationTargetException e) { - System.err.println("Exception thrown while attempting to get member variable. See: " + e.getMessage()); + logger.LogError(e); + System.err.println("Exception thrown while attempting to get member variable. See: " + e.getMessage()); } } } @@ -449,7 +458,7 @@ private Message protonMessageToIoTHubMessage(MessageImpl protonMsg) } } } - + logger.LogInfo("Completed the conversion of AmpqsMessage into IoT Hub message, method name is %s ", logger.getMethodName()); return msg; } @@ -460,8 +469,9 @@ private Message protonMessageToIoTHubMessage(MessageImpl protonMsg) */ private MessageImpl iotHubMessageToProtonMessage(com.microsoft.azure.sdk.iot.device.Message message) { + logger.LogInfo("Started converting IoT Hub message into AmpqsMessage, method name is %s ", logger.getMethodName()); MessageImpl outgoingMessage = (MessageImpl) Proton.message(); - + logger.LogInfo("Content of message is %s, method name is %s ", new String(message.getBytes(), Message.DEFAULT_IOTHUB_MESSAGE_CHARSET), logger.getMethodName()); Properties properties = new Properties(); if(message.getMessageId() != null) { @@ -489,6 +499,7 @@ private MessageImpl iotHubMessageToProtonMessage(com.microsoft.azure.sdk.iot.dev Binary binary = new Binary(message.getBytes()); Section section = new Data(binary); outgoingMessage.setBody(section); + logger.LogInfo("Started converting IoT Hub message into AmpqsMessage, method name is %s ", logger.getMethodName()); return outgoingMessage; } } \ No newline at end of file