Skip to content

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.

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.
ParameterTypeDefaultDescription
messagestring—The text to log. It can be fixed text in quotes ("Started") or an expression that combines variables ("Total: " + total).
ParameterTypeDefaultDescription
levelstring"info"Importance of the message. Values: info, warning, error, debug (case-insensitive). Picked from a list; any other value is logged as info.
LevelWhen to use it
debugFine detail for deep diagnosis (intermediate values)
infoNormal milestones of the process (“15 invoices read”)
warningSomething unexpected that does not stop the bot (“customer without email, skipped”)
errorA relevant failure (typically inside a catch)

Logging at the error level does not make the execution fail: use Throw for that.

This activity does not return a value.

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"

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.

  • 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.