Caffeine

Debug

Reference Core Last updated: Lua 3 · Dryad 1

Logging to the engine console.

All namespaces

Namespace: caffeine.debug · Dryad prefix: caffeine_log

log#

Lua: caffeine.debug.log · Dryad: caffeine_log

text
log(msg)

Writes an info message to the engine log (source "Lua"). In Dryad caffeine_log(value) logs the first argument as text under "Dryad".

ParametersTypeDescription
msgstringMessage text.

Returns: none

Example

lua
caffeine.debug.log('hello')

warn#

Lua: caffeine.debug.warn

text
warn(msg)

Writes a warning to the engine log.

ParametersTypeDescription
msgstringMessage text.

Returns: none

Example

lua
caffeine.debug.warn('low health')

error#

Lua: caffeine.debug.error

text
error(msg)

Writes an error message to the engine log. It does not stop the script.

ParametersTypeDescription
msgstringMessage text.

Returns: none

Example

lua
caffeine.debug.error('missing target')