Overview
IoT Platform supports uploading local device logs. You can query the local device logs on the Device Log page of the IoT Platform console for troubleshooting. This article describes how to configure Link SDK for C to upload local device logs to IoT Platform.
Prerequisites
- You have the device authentication information.
- On the Device Details page of IoT Platform, the Device local log reporting switch is turned on.
- Obtain the C Link SDK.
When you customize the SDK, on the Device log.
- Set up the development environment.
Background information
- For more information about local device logs, see On-premises device logs.
- For more information about data formats, see Device log reporting.
How it works
An application establishes a connection with the IoT Platform by calling the C Link SDK APIs based on the connect with IoT Platform over MQTT and upload local device logs.
The following time series chart uses the device application./demos/logpost_basic_demo.c as an example to illustrate the implementation flow.

For more information about log uploading-specific API operations, see aiot_logpost_api.h.
What to do next
After device logs are uploaded to IoT Platform, you can view the logs in the IoT Platform console. For more information, see Query on-premises device logs.