Log reference
The 4 functions and 0 values of log: signature, effects, phase, cost and tested examples.
Write lines to the script's log, or stop the run with a message.
Functions#
log.abort#
log.abort([message])
Stops the run with this message.
- Effects: can raise an alert.
- Phase: every bar.
- Cost: counts against the alerts allowed per bar and per run.
- Examples: Logged crossings, Stopped on purpose.
log.error#
log.error([message], ...values)
Writes an error line to the script's log.
- Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.
- Examples: Logged crossings, Stopped on purpose.
log.info#
log.info([message], ...values)
Writes a line to the script's log. The text may hold {0}, {1} for the values after it.
- Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.
- Examples: Logged crossings, Stopped on purpose.
log.warning#
log.warning([message], ...values)
Writes a warning line to the script's log.
- Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.
- Examples: Logged crossings, Stopped on purpose.