How to disable default trace/log messages of iot hub C++ client

SilverChips 71 Reputation points
2021-02-12T08:53:54.227+00:00

When I run my client I get the following displayed in my console. How can I disable this and make sure its not being written to the standard out

-> 00:50:54 CONNECT | VER: 4 | KEEPALIVE: 240 | FLAGS: 192 | USERNAME: xxxxxx/?api-version=2019-10-01&DeviceClientType=iothubclient%2f1.3.9%20(native%3b%20WindowsProduct%3a0x00000008%206.2%3b%20x64%3b%20%7b8DA4D7CC-3ACD-46D1-B068-9635F8587174%7d) | PWD: XXXX | CLEAN: 0
<- 00:50:54 CONNACK | SESSION_PRESENT: true | RETURN_CODE: 0x0
-> 00:50:54 SUBSCRIBE | PACKET_ID: 2 | TOPIC_NAME: $iothub/twin/res/# | QOS: 0 | TOPIC_NAME: $iothub/methods/POST/# | QOS: 0
<- 00:50:54 SUBACK | PACKET_ID: 2 | RETURN_CODE: 0 | RETURN_CODE: 0
-> 00:50:54 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/twin/GET/?$rid=3
-> 00:50:54 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/twin/PATCH/properties/reported/?$rid=4 | PAYLOAD_LEN: 1775
<- 00:50:54 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: QOS_VALUE_INVALID | TOPIC_NAME: $iothub/twin/res/200/?$rid=3 | PAYLOAD_LEN: 1179
-> 00:50:54 SUBSCRIBE | PACKET_ID: 5 | TOPIC_NAME: $iothub/twin/PATCH/properties/desired/# | QOS: 0
<- 00:50:54 SUBACK | PACKET_ID: 5 | RETURN_CODE: 0

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
378 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
208 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,661 Reputation points Microsoft Employee
    2021-02-12T19:55:29.463+00:00

    When you used CMAKE did you turn ON the option no_logging ?

    https://github.com/Azure/azure-iot-sdk-c/blob/master/CMakeLists.txt#L70

    67459-image.png

    Thanks!

    1 person found this answer helpful.