How to find messages written in jslog().

sekharksnow
Tera Contributor

can you please tell me any table have the log messages used in jslog() method in client script

3 ACCEPTED SOLUTIONS

Hi @sekharksnow ,

 

You can use alert('<your_message>'); in client scripts.

 

Please have a look at the below articles for jslog()

https://www.servicenow.com/community/developer-forum/jslog-method-is-not-writing-anything-to-javascr...

 

https://www.oreilly.com/library/view/servicenow-application-development/9781787128712/b45c9b36-48a7-...

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

View solution in original post

@sekharksnow 

why not use alert() or console statements to debug?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

palanikumar
Mega Sage

Hi,

 

jslog will print messages in browser console.

If you are using Chrome press F12 to open the DevTools. All your messages will be printed under console tab. Make sure you login as Admin in ServiceNow

 

Thank you,

Palani

 

Thank you,
Palani

View solution in original post

6 REPLIES 6

Hello @sekharksnow   jslog simply logs to the browser so there is no permanent record of it on the server.  Not sure what your use case is but if you really need to you can create a custom REST endpoint that accepts arbitrary strings and logs them to syslog using gs.log

 

If my response helped please mark it correct, so it can benefit other readers.

palanikumar
Mega Sage

Hi,

 

jslog will print messages in browser console.

If you are using Chrome press F12 to open the DevTools. All your messages will be printed under console tab. Make sure you login as Admin in ServiceNow

 

Thank you,

Palani

 

Thank you,
Palani