Skip to content

Console

Console object is used to write messages to the default logging output. It has several log levels INFO, WARNING, ERROR, TRACE.

Basic Usage

let text = "Hello World!";
console.info(`Info message ${text}.`);
console.error(`Error message ${text}.`);
console.warn(`Warning message ${text}.`);
console.debug(`Debug message ${text}.`);
console.log(`Log message ${text}.`);
console.trace(`Trace ${text}.`);

Functions


Function Description Returns
log(message) Logs a raw message with level INFO -
info(message) Logs a message with level INFO -
warn(message) Logs a message with level WARN -
error(message) Logs a message with level ERROR -
debug(message) Logs a message with level DEBUG -
trace(message) Logs a message with level ERROR with the full stack trace -