Debug
Logging to the engine console.
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".
| Parameters | Type | Description |
|---|---|---|
msg | string | Message text. |
Returns: none
Example
lua
caffeine.debug.log('hello')
warn#
Lua: caffeine.debug.warn
text
warn(msg)
Writes a warning to the engine log.
| Parameters | Type | Description |
|---|---|---|
msg | string | Message 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.
| Parameters | Type | Description |
|---|---|---|
msg | string | Message text. |
Returns: none
Example
lua
caffeine.debug.error('missing target')