Console

The console module allows to output messages into the studio log dock panel.

Reference

console.log(text)

Output log message

Parameters:

text (str)

console.debug(text)

Output debug message

Parameters:

text (str)

console.warning(text)

Output warning message

Parameters:

text (str)

console.error(text)

Output error message

Parameters:

text (str)

Examples

Output different texts to log panel
local Console = require 'engine/console'
local System = require 'engine/system'

Console.log("Hello World!")
Console.debug("The current time is " .. tostring(System.getTime()))
Console.warn("This is a warning")
Console.error("Something went wrong!")