wolfhacklua API 1.1 Forum

log

Write to the script's console on the Scripts page. print goes to the same place.

since 1.0no permission needed

Each script has its own log (the last 300 lines). A line that repeats is stored once with a count. Messages longer than 2000 characters are cut. Errors the host catches for you appear here as well.

Reference#

log.info#since 1.0

log.info(...: any)

An informational line.

ParameterTypeDescription
...anyValues, converted with tostring and joined by spaces.
lua
log.info("loaded", api.version)

log.warn#since 1.0

log.warn(...: any)

A warning, shown in the warning colour.

ParameterTypeDescription
...anyValues to print.

log.error#since 1.0

log.error(...: any)

An error line, shown in red. It does not stop the script (a raised error does not stop it either; the host counts them, see troubleshooting).

ParameterTypeDescription
...anyValues to print.
API 1.1 · source docs-src/api/log.json