Log
Type: log · Package: Core Activities v1.0.8
Writes a message to the execution log. It is the activity you use to “narrate” what your bot is doing: how many records it read, what decision it made, why it skipped an element. Since automations usually run on their own with nobody watching, these messages are your main tool to understand and diagnose an execution.
The messages appear in the Designer debug panel when you test locally, and in the Zoan Cloud execution logs when it runs in production.
How it works
Section titled “How it works”Place a Log activity anywhere in the flow. When the execution reaches it, it evaluates the message (fixed text or an expression) and writes it with the given level. It does not stop or alter the flow: it only records and continues.
- A message that evaluates to empty (
null) is logged as an empty line. - If the text contains the value of an already resolved credential, that value is masked as
***, in Zoan Cloud as well.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
message | string | — | The text to log. It can be fixed text in quotes ("Started") or an expression that combines variables ("Total: " + total). |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
level | string | "info" | Importance of the message. Values: info, warning, error, debug (case-insensitive). Picked from a list; any other value is logged as info. |
Available levels
Section titled “Available levels”| Level | When to use it |
|---|---|
debug | Fine detail for deep diagnosis (intermediate values) |
info | Normal milestones of the process (“15 invoices read”) |
warning | Something unexpected that does not stop the bot (“customer without email, skipped”) |
error | A relevant failure (typically inside a catch) |
Logging at the error level does not make the execution fail: use Throw for that.
Output
Section titled “Output”This activity does not return a value.
Example
Section titled “Example”Log how many records were read and flag a special case:
Log level = info message = "Read " + rowCount(table) + " rows from Excel"
If condition = isEmpty(str(row["Email"])) └─ then: Log level = warning message = "Row " + i + " has no email; skipped"Common errors
Section titled “Common errors”This activity does not fail on its own; it can only fail if the message expression cannot be evaluated (for example, a variable that does not exist). Check the expression in the editor, which validates it as you type.
Related activities
Section titled “Related activities”- Log to File — write the same line to a file of your own.
- Throw — besides logging, stop the bot with an error.
- Try / Catch — catch an error to log it in the catch.