Documentation for version v72
Log
Description
The log pipe writes a message to procpiper.log. Allows you to set the text of the message.
Peculiarities:
params.messagemust be a text
Structure
| Field | Type of value | Example | Required | Description |
|---|---|---|---|---|
| id | number | 10 | yes | Pipe's ID |
| type | string | "log" | yes | Type of a pipe |
| params | LogParamsObject | no | Type-specific parameters | |
| outs | OutsObject | no | Pipe's outputs |
| ErrorParamsObject | |||||
|---|---|---|---|---|---|
| Fi | Type | Example | Reqiered | Description | |
| prefix | string | "Send|" | no | "<channel's id>|<pipe's id>" | Custom prefix for log message. |
| message | string | "error http request $error.code $error.message" | no | "" | Text of a message. |
| level | string | "trace" | no | "info" | Logging level. Possible values:
|
Errors
- Error processing params.message - the template is incorrect or the field was not found.
Examples
1.
{
"id": 10,
"type": "log",
"params": {
"message": "error http request $error.code $error.message"
},
"outs": {
"success": 20
}
}
{
"id": 10,
"type": "log",
"params": {
"message": "some message"
"level": "trace"
},
"outs": {
"success": 15
}
}