By default, you can view the logs generated in the last seven days in the Device Log module of the IoT Platform console. You can also export logs from the module to a Logstore of Log Service for persistent storage. After you enable the local log dump feature, you can query and analyze logs and configure alerts in the IoT Platform console.
Prerequisites
- 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 View. 3. On the Device Details page, turn on Device local log reporting. . 2. Find the required device in the device list and click
- Log Service is activated. For more information, see Resource management overview.
Usage notes
The log dump feature is available only for Alibaba Cloud accounts. RAM users are unable to use this feature.
When the log dump feature is enabled, the logs are shipped to and stored in Alibaba Cloud Log Service. You are charged for storing logs in the Logstore based on the pricing of Log Service. For more information, see Overview.
Enable the local log dump feature
If you want to store logs from more than one product for an extended period, you must enable the log dump feature for each product.
Use the log query and analysis feature
After you enable the local log dump feature, you can perform the following operations on the Local Log Dump tab.
Operation | Description |
---|---|
Query and analyze logs | The Raw Logs tab allows you to use SQL statements to query logs within a specified period of time and perform statistical analysis. For more information about the SQL syntax, see Search syntax and Log analysis overview. |
View charts | The Graph tab allows you to view the generated charts. |
Aggregate logs | The LogReduce tab allows you to aggregate similar logs and obtain a more comprehensive view of your business. |
Perform quick analysis | After you query logs, you can analyze the query result and view the distribution of a field in the result. |
Configure an alert rule | If an alert condition is met, IoT Platform sends an alert by text message, phone call, email, or DingTalk notification. |
Disable the local log dump feature
You can disable the local log dump feature for a specific product at any time as needed to save the storage space.