Log
Type: log · Package: Core Activities v1.0.0
Writes a message to the execution record (the logs). It’s the activity you use to “narrate” what your bot is doing: how many records it read, what decision it made, why it left out an item. Since automations usually run alone and without anyone looking at them, these messages are your main tool to understand and diagnose a run.
The messages appear in the Designer debug panel when testing locally, and in the Zoan Cloud run logs when running in production.
How it works
Section titled “How it works”Place a Log activity at any point in the flow. When the execution reaches it, it evaluates the message (which can be fixed text or an expression) and writes it with the indicated level. It doesn’t stop or alter the flow: it just records and continues.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
message | expression | The text to register. It can be a literal or a = expression that combines variables. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
level | list | Message importance. Options: info (default) · warning · error · debug. |
Niveles disponibles
Section titled “Niveles disponibles”| Nivel | When to use it |
|---|---|
debug | Fine detail for deep diagnosis (intermediate values) |
info | Normal process milestones (“15 invoices read”) |
warning | Something unexpected but that doesn’t stop the bot (“client without email, skipped”) |
error | A relevant bug (typically within a catch) |
Example
Section titled “Example”Record how many records were read and report a special case:
Log level = info message = = "Se leyeron " + rowCount(tabla) + " filas del Excel"
If condition = = isEmpty(str(row["Correo"])) └─ then: Log level = warning message = = "La fila " + i + " no tiene correo; se omite"Related activities
Section titled “Related activities”- Throw — in addition to logging, stop the bot with an error.
- Try / Catch — catch an error to log it in the catch.