Global JavaScript scope

This document describes functions in the global scope available in the JavaScript environment for app serivices.

Table of content

Global functions log

Global functions

log
log(expression)

Evaluates the given expression and prints the result to the log file of the app instance using the flag LOG_APP. The function works similar to the console.log function in browsers.

Example:

log("hello world");
log("3 + 5 = " + (3 + 5));
log("message: " + JSON.stringify({ mt: "SomeMessage", value: 5 }));
Example log file:
07-29 17:05:08.982 generic@test.com JS: hello world
07-29 17:05:08.993 generic@test.com JS: 3 + 5 = 8
07-29 17:05:09.130 generic@test.com JS: message: {"mt":"SomeMessage","value":5}