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

Ankur Bawiskar
Tera Patron
Tera Patron

@sekharksnow 

I don't think it's stored anywhere as compared to system logs

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

sekharksnow
Tera Contributor

Is there any way to debug client script or catalog client script  to define any log messages and these log messages stored in some where.

 

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.

@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