Devices, including gateway devices and sub-devices, can submit logs to IoT Platform. You can query local device logs and troubleshoot problems on the Device Log page of the IoT Platform console.
Prerequisites
- The C SDK is used to develop a device so that the device can submit logs. For more information, see Submit device logs.
- The Device local log reporting switch is turned on. To turn on the switch, you must log on to the IoT Platform and perform the following steps: 1. Choose View. 3. On the Device Details page, turn on the Device local log reporting switch. . 2. Find the required device in the device list, and click
Query local device logs
Log fields
The following table lists the log fields.
Parameter | Description |
---|---|
Reported At | The time when the device submits the log. |
Collected At | The time when the device collects the log. |
TraceId | The tracing ID. You can use this ID to search for series modules. |
DeviceName | The name of the device. |
Log Level | By default, logs of all levels are displayed. You can only query logs of a certain
level. In addition to the OTHER level, log levels are in descending order:
|
Module Name | The name of the module that generates the log, the module name is user-specified. |
Content | The content of the log. |
Analyze device logs
The log content includes the Code parameter. You can analyze device logs based on response codes, see Error codes for device SDKs.