$log/operation/${productid}/${devicename}
$log/operation/result/${productid}/${devicename}
$log/operation/${productid}/${devicename}
topic to query whether it should upload logs and the required log level:{"type": "get_log_level","clientToken": "PPXLSKBUPZ-**"}
{"type": "get_log_level","clientToken": "PPXLSKBUPZ-**","log_level": 4,"result": 0,"timestamp": 1619599073}//log_level: 0: do not report logs; 1: ERROR; 2: WARN; 3: INFO; 4: DEBUG
ProductId
and DeviceName
to initiate an http/https
request to the platform. The request API and parameters are as detailed below:http://ap-guangzhou.gateway.tencentdevices.com/device/reportlog
https://ap-guangzhou.gateway.tencentdevices.com/device/reportlog
Parameter | Required | Type | Description |
ProductId | Yes | String | Product ID |
DeviceName | Yes | String | Device name |
Message | Yes | Array | Reported log content, which is a string array. The log level needs to be added before each log entry. Currently, DBG, INF, ERR, and WRN are supported |
application/json
format.Parameter | Type | Description |
RequestId | String | Request ID |
POST https://ap-guangzhou.gateway.tencentdevices.com/device/reportlogContent-Type: application/jsonHost: ap-guangzhou.gateway.tencentdevices.comX-TC-Algorithm: HmacSha256X-TC-Timestamp: 1551****65X-TC-Nonce: 5456X-TC-Signature: 2230eefd229f582d8b1b891af7107b91597240707d7****3738f756258d7652c{"DeviceName":"AAAAAA","Message":["INFmqtt connect success."],"ProductId":"G8N9****HB"}
{"Response": {"RequestId": "f4da4f1f-d72e-40f1-****-349fc0072ba0"}}