Report Device Logs¶
A device can publish a message to this topic to report logs to the cloud.
Upstream
Request TOPIC:
/sys/{productKey}/{deviceKey}/thing/log/postReply TOPIC:
/sys/{productKey}/{deviceKey}/thing/log/post_reply
Sample Request Format¶
{
  "id":"123",
  "version":"1.0",
  "params":{
    "logs":{
      "traceId":"traceId",
      "level": "info",
      "module":"name",
      "content":"json type"
    },
    "time":123456
  },
  "method":"thing.log.post"
}
Sample Response Format¶
{
  "id":"123",
  "code":200,
  "data":{}
}
Request Parameter Description¶
Parameter  | 
Type  | 
Mandatory/Optional  | 
Description  | 
|---|---|---|---|
id  | 
String  | 
Optional  | 
The message ID. It is a reserved parameter that is reserved for future use.  | 
version  | 
String  | 
Mandatory  | 
The version of the protocol. The current version is 1.0.  | 
params  | 
Object  | 
Mandatory  | 
The parameters used for reporting the logs.  | 
logs  | 
Object  | 
Mandatory  | 
The logs details.  | 
traceId  | 
String  | 
Optional  | 
The trace ID.  | 
level  | 
String  | 
Optional  | 
The log level.  | 
module  | 
String  | 
Optional  | 
The log module.  | 
content  | 
String  | 
Optional  | 
The log content.  | 
time  | 
Long  | 
Optional  | 
The timestamp of the log. When not specified, the value is the server time.  | 
method  | 
String  | 
Mandatory  | 
The request method.  | 
Response Parameter Description¶
Parameter  | 
Type  | 
Mandatory/Optional  | 
Description  | 
|---|---|---|---|
code  | 
Integer  | 
Mandatory  | 
The return code. “200” indicates that the requested operation is executed successfully.  |