Skip to content

Write Log – writing a line into the log

The command "Write Log" writes a text into the application log and into the protocol of the action. Use it to make an action traceable – what it decided and why. This page is for administrators who build and maintain actions, especially those that run in the background.


1. At a glance

Purpose Leave a trace of what the action did
Typical use "Imported 120 records", "Skipped order O-1042: no customer", diagnosis of a rarely failing action
Where in the editor Toolbar menu "Data" → "Write Log"
Needs a user interface No
Needs a current record No (the expression may read one)
Related Actions – execution history, Monitoring

2. Settings

The settings are on the tab "Settings". Like every command, the command also has "Display Name", "Description" and "Execution Condition" on the tab "General" (see Actions).

Setting Meaning Default / Required
"Level" "Debug", "Information", "Warning" or "Error" Debug
"Content" Expression for the text, evaluated against the current record Required

3. Behaviour

  1. Without "Content", the command is skipped.
  2. The text is computed and written with the chosen level, prefixed with "WriteLog:" and information about the action and the command.
  3. The line appears
  4. in the application log of the server, if the log is configured to keep that level,
  5. in the protocol of the run – shown in the execution history for recorded runs (see Actions),
  6. in the developer console.
  7. The action continues. "Error" does not end the action.

The level counts in the execution history, though: a recorded run that wrote a line with "Error" is shown as failed, one with "Warning" as succeeded with warnings – even if the action ran to the end. With "Store Execution Log" set to "On failure or warnings", the log of such a run is kept. Use "Error" only for real problems.


4. Examples

Result of an import. Last command of a scheduled import: "Level" "Information", "Content" a text expression that joins "Imported " and the variable "Count" and " records".

Data problem. In a loop, with the execution condition "Customer is empty": "Level" "Warning", "Content" "Order without customer: " plus the order number.


5. Limitations

  • The default level is "Debug". Many installations do not keep debug lines in the application log; choose "Information" or higher for lines you want to find later.
  • Write Log does not notify anybody. To alert someone, use Send E-Mail.