sys_log()
Write a line to the flow's run log. The main tool for debugging an automation — every line shows in the run's detail view.
Syntax
sys_log(message)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
message |
string | yes | The text to log. |
Returns
Nothing.
Example
sys_log("Starting sync for " . $record["name"]);
$rows = records_query("orders", [["field" => "customer", "op" => "=", "value" => $record["_meta"]["id"]]]);
sys_log("Found " . count($rows) . " orders");
Example output
Starting sync for Acme Inc
Found 3 orders
Notes
- Open a flow's run history to see logged lines for each run.
- Concatenate values into the message with
.— to log an array readably, encode it first withtojson().
See also: PHPScript basics