Log to File
Log to File
Section titled “Log to File”Type: log-to-file · Package: Core Activities v1.0.0
Appends a log line to a text file of your choosing, formatted as [timestamp] [LEVEL] message. Useful when you need to keep a record in your own file (an audit trail, a log another system watches, a cumulative report) in addition to the execution log the platform captures.
It is different from Log: log writes to the execution log (the one you see in the debug panel and in Zoan Cloud logs); log-to-file writes to a file on disk. Use whichever fits where you want the message to land; you can use both at once.
How it works
Section titled “How it works”When execution reaches the activity, it evaluates the message, formats it as a line ([2026-06-16 10:30:00] [INFO] message) and appends it to the file given in path, creating the file (and its folders) if they don’t exist. Each call adds a new line. It doesn’t stop the flow: it records and continues.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Log file path (created if it doesn’t exist). |
message | expression | The text to record. Can be a literal or a = expression. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
level | list | Message importance. Options: info (default) · warning · error · debug. |
timestamp | yes/no | Prefix each line with the date and time (default: yes). |
Example
Section titled “Example”Keep your own log of the invoicing process:
Log to File path = = "C:/logs/invoicing.log" level = info message = = "Process start — " + str(rowCount(invoices)) + " invoices"
For Each item = invoice in = = invoices └─ body: Log to File path = = "C:/logs/invoicing.log" level = error message = = "Invoice " + str(invoice["Number"]) + " has no email"Produces a file like:
[2026-06-16 09:00:01] [INFO] Process start — 15 invoices[2026-06-16 09:00:04] [ERROR] Invoice INV-021 has no emailRelated activities
Section titled “Related activities”- Log — write to the execution log (not to a file).
- Append to File — append raw text to a file (without log formatting).
- Try / Catch — log the error caught in the
catchto a file.