Log message
Writes a line of text into the run's Trace.
Log text
Keyboard Maestro: Log
Details #
Adds a line to the Trace for the run, so you can see what a variable held or which branch a macro took. Nothing else happens: no window, no sound, no file. The text can use variables and expressions.
The step's output is the text. The Trace shows the first 200 characters. The full text is also written to the app's log at the step's level, marked private.
Use Show message or Show notification when you want to see the message while the macro runs.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
level | text | debug, info (the default), warning or error. It sets the severity of the line in the app's log, and the Trace note reads log (warning): ... for any level but info. Another value fails the step. | ||
text | text | The text to write. An empty text writes an empty line. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Set count to 3
- Log “count is {{ count }}”
- Show “Logged: count is {{ count }}” for 2 s
Gotchas #
In a dry run the step is simulated, so nothing is written unless you set
dryRunSafeon it.The line only exists in the Trace of that run. It is not a file you can keep.