Where is gs.debug() output?

hghg
Kilo Contributor

I use gs.debug to generate some debug message. I have enabled Session Debug in my application.   I even tried "Enable All" under System diagnostics-> Session Debug and Debug Log. Still don't see the debug message printed out in System Logs > System Log > Application Logs.

Where I should go to see the debug message printed by gs.debug() in my application?

10 REPLIES 10

Narendranath R1
Tera Contributor

gs.debug will not by default write to syslog table. For scoped application you need to enable it via system properties via sys_properties.list > new 

 

<app_scope>.logging.verbosity = debug

you can see the debug log in the syslog table. 

 

content from developer docs

The scoped GlideSystem API has a gs.debug() method. By default, the scoped GlideSystem debug() method does not write to the Application log when the gs.debug() method is used in a script. To enable the gs.debug() method, create or modify the application property with the name syntax <app_scope>.logging.verbosity. Set the Value field in the <app_scope>.logging.verbosity property to debug to log debug messages from the gs.debug() method to the Application Log. For all other log levels, set the Value field to a comma-separated list of desired log levels