Skip to main content

Logger

There is no dedicated logger service in Web Modules. Instead the logging methods from window.console should be used.

Available methods

List of available methods:

console.debug(...args);
console.log(...args);
console.warn(...args);
console.error(...args);

Logs are automatically prefixed with the Web Module name:

[com-sabre-sample-web-module]: Log message
Note
Depending on the developer tools logging level setting some logs can remain hidden in the console.

Desktop environment

On top of that, on desktop environment logger messages appear also in desktop logs (edge.0.log):

INFO: JS >>> [com-sabre-sample-web-module]: Log message

Logging levels from the console are mapped to Java in a way presented below:

debug -> fine
log   -> info
warn  -> warning
error -> severe