Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print from XSJS to Console

Tags:

hana

hana-xs

I have some code in XSJS to populate/Update my Hana DB based on some conditions. I am looking for a mechanism where I can print few comments to console or to some log file.

I know i can use console.log(); for normal javascript on web browser but it does not work on XSJS. Some other implementation of Server Side JS like node.js gives echo command. Is there something similar for XSJS ?

Thanks in advance.

like image 654
Raghuveer Avatar asked Feb 14 '23 09:02

Raghuveer


1 Answers

Use $.trace.debug("Type your log comments here"); within the xsjs file and then you can see the logs in trace file under the 'Diagnosis File' section for system.

Before that you need to change the 'Database Trace' configuration for XS-Engine under the 'Trace Configuration' Section.

like image 125
Ashish Avatar answered May 13 '23 13:05

Ashish