log.publish
The log.publish command is used to publish a log entry for a Thing.
TR50 Request
{
"cmd": {
"command": "log.publish",
"params": {
"thingKey": "mything",
"msg": "Log message"
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
thingKey |
String |
|
Identifies the Thing to which the log entry is to be associated. Defaults to the current session's Thing. |
ts |
String |
|
The timestamp to be associated with the log entry. Defaults to the current time. |
msg |
String |
Yes |
The message to publish to the log. |
level |
Integer |
|
The log level. Defaults to 2. The log levels are 0 (Error), 1 (Warning), and 2 (Information). |
corrId |
String |
|
The correlation identifier to be associated with the log entry. |
global |
Boolean |
|
If set to true the log entry is global, otherwise it will be associated with the thingKey. |
TR50 Response
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true
}
}