OPTION_LOG_TRACE is not working on the Azure Sphere

Dmytro Seliverstov 41 Reputation points


I'm trying to debug the device connection to the IoTHub.
Found an OPTION_LOG_TRACE in iothub_client_options.h that I'm passing to IoTHubDeviceClient_LL_SetOption and Prov_Device_LL_SetOption right after handles creation. But I don't see any new logs after enabling those options. Is there any additional code or options need to be set for the project, to see the connection log trace?

Azure Sphere
Azure Sphere
An Azure internet of things security solution including hardware, operating system, and cloud components.
159 questions
{count} votes

Accepted answer
  1. Alistair Lowe 191 Reputation points Microsoft Employee

    Hello @Dmytro Seliverstov ,

    Unfortunately, to reduce resource usage and ensure long-lasting API/ABI compliance, the IoT Hub C SDK embedded within the Azure Sphere OS is compiled with the flag NO_LOGGING set.
    You will be able to see from mqtt_client_set_trace in mqtt_client.c (which is called as part of OPTION_LOG_TRACE) that this functionality is disabled when NO_LOGGING is set.

    Many thanks

0 additional answers

Sort by: Most helpful