Not seeing debug output

peterraeves
Mega Guru

I had seen debug output with one client, so I tried to use 'gs.debug' myself, but I do not see any output?

I did notice the property 'glide.amb.log.level', which is set to 'info', but I'm not sure whether that's the culprit. Especially as I cannot decrease that value to 'debug' as it is maint only. Anyone any ideas?

15 REPLIES 15

Yes Peter


I understand that you are not in eureka and have upgraded to higher version. But gs.debug works for the scoped application or when the session debug is enabled. See below notes in wiki.



"You can safely use gs.debug() in your applications. The debug messages are printed only when in debug mode or when session debug for that application is enabled. You should try out the scoped Logging API by printing with gs.debug() in your business rules and script includes, and enabling session debug in the UI."



http://wiki.servicenow.com/index.php?title=Scoped_Script_Logging#gsc.tab=0




Regards,


harsh


I'm not sure I understand your answer. gs.log does not create log records in the log table, doesn't it? It would do exactly the same as gs.debug? Am I not understanding something here?


gs.log()   will create log in the log table but gs.debug() will not create log in the log table.


I tried 'gs.log('hello')' and it still showed up as Level equal to information? Not debug? So it does the same as gs.info?


Yes, the gs.log() and gs.info() are almost similar.


gs.log() is legacy and for global application only while gs.info() is the new and work for the scoped applications and I think it work for the global application also.