Chapter 8: Console

Can be used for printing to the Scripting Console similar to the console functions provided by most web browsers. The Console function provide implicit formatting features known from the MessageFormat Java class. There is a singleton console object in the global scope when supported by the scripting language. For more information on how to format a message, see the MessageFormat API of Java 7

console.log(format, arguments...)

{Function} - Logs a formatted message to the console.

console.log("Performed {0} actions in {1,number}ms on {2}",
count, time, date);

Stability 3 - Stable

console.info(format, arguments...)

{Function} - Same as console.log

console.info("Unformatted information");

Stability 3 - Stable

console.error(format, arguments...)

{Function} - Same as console.log but prints to the error channel (typically text is rendered in a different color)

console.error("An unexpected problem occured: {0}", e);

Stability 3 - Stable