Provides functions to print data to the debug console (UI) or standard output (command line tools). The console object is also available for compatibility as global object "console".
Methods
(static) assert(assertion, varargs)
Prints the objects if the assertion is false
Name | Type | Description |
---|---|---|
assertion | boolean | Assertion |
varargs | The objects to log |
(static) dir(obj)
Prints the properties of the object
Name | Type | Description |
---|---|---|
obj | The object to print |
(static) error(varargs)
Same as log(), with log level ERROR
Name | Type | Description |
---|---|---|
varargs | The objects to log |
(static) info(varargs)
Same as log()
Name | Type | Description |
---|---|---|
varargs | The objects to log |
(static) log(varargs)
Prints the objects to the console with the default log level. Note that string substitution is not supported yet
Name | Type | Description |
---|---|---|
varargs | The objects to log |
(static) time(label)
Starts a named timer
Name | Type | Description |
---|---|---|
label | string | The name of the timer |
(static) timeEnd(label)
Stops and logs a named timer. If the timer was not started with time(), nothing will be logged
Name | Type | Description |
---|---|---|
label | string | The name of the timer. |
(static) trace()
Prints a stack trace
(static) warn(varargs)
Same as log(), with log level WARNING
Name | Type | Description |
---|---|---|
varargs | The objects to log |