Breadcrumb
- Sabre Red 360 Software Development Kit Help
- Web Red Apps
- Web Modules
- Web Modules API Reference
- Logging in Typescript
Logging in Typescript
In typescript there is no dedicated logger service for logging, instead the logging methods from window.console should be used:
console.debug(obj1 [, obj2, ..., objN]);
console.log(obj1 [, obj2, ..., objN]);
console.warn(obj1 [, obj2, ..., objN]);
console.error(obj1 [, obj2, ..., objN]);
Depending on Sabre Red Web logging level for web and developer tools settings some logging levels may remain hidden in the console.
After logging a message from a RedApp, the message itself will be prefixed with it’s web module e.g.
[com_sabre_redapp_example3_web_customworkflow]: Test
On top of that, on Sabre Red 360 this message should also appear in edge.0.log:
INFO: JS >>> [com_sabre_redapp_example3_web_customworkflow]: Test
Logging levels from the console are mapped to java in a way presented below:
debug -> fine log -> info warn -> warning error -> severe