Devices, including gateway devices and sub-devices, can submit logs to IoT Platform. You can query local device logs and troubleshoot issues on the Device Log page of the IoT Platform console.


  • An SDK for Android or SDK for C is used to develop a device. Logs are submitted by the device. For more information about how to reset a password, see Device log reporting.
  • Device local log reporting is turned on. To turn on the switch, you must log on to the IoT Platform and perform the following steps: 1. Choose Devices > Devices. 2. Find the required device in the device list and click View. 3. On the Device Details page, turn on Device local log reporting.

Query local device logs

  1. Log on to the IoT Platform console.
  2. On the Overview page, find the instance and click the instance name to go to the Instance Details page.
    Notice Enterprise Edition instances are available only in the China (shanghai) and Japan (Tokyo) region. If your IoT Platform is not activated in the China (shanghai) or Japan (Tokyo) region, skip this step.
  3. In the left-side navigation pane, choose Maintenance > Device Log.
  4. Select a product and click the Device local log tab.
  5. Specify the search conditions and click Search.

    The following table describes the supported search conditions.

    Search condition Description
    DeviceName Enter a DeviceName. You can search for the logs of a device by DeviceName.
    TraceId Enter a trace ID to search for the logs of series modules.
    Module name Enter a module name to search for the logs that are generated by the module.
    Keyword Enter a keyword to search for the logs that contain the keyword. Supported keywords: the name of a parameter in an API request, the failure cause, the ID of a message, the ID of a device, and the name of an operation.
    Time range Select a time range.

Log fields

The following table describes the log fields.

Parameters Description
Reported At The time when the device submitted the log.
Collected At The time when the device collected the log.
TraceId The trace ID. You can use this ID to search for series modules.
DeviceName The DeviceName of the device.
The log level. By default, logs of all levels are displayed. You can query only logs of a specific level. Log levels other than the OTHER level are in descending order:
  • WARN
  • INFO
  • OTHER: another log level
Module The name of the module that generates the log.
  • If the device uses the SDK for Android, the module name is ALK-LK.
  • If the device uses the SDK for C, the module name is user-specified.
Description The content of the log.

Analyze device logs

The log content includes the Code parameter. You can analyze device logs based on response codes.
  • For more information about the status codes that may be returned if the device uses the SDK for C, see Status codes for the SDK for C.
  • If the device uses the SDK that is developed by you, customize the status code or leave it empty.