gs.log or gs.info is not working in script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2018 11:46 AM
Hi All,
I am using Dynamic Filter Option which calls script include. The script include has gs.log() statement which doesn't show up in system logs. What could be the issue?
Both Dynamic Filter and Script include are in Global application.
Thanks,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2018 11:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2018 02:43 AM
I have the same.
After upgrade to London logging from client callable script include does not work.
The same scripts were logging fine on old release.
Maybe this is something about https://docs.servicenow.com/bundle/london-platform-administration/page/administer/security/reference/r_ScriptSandboxing.html ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2019 03:00 PM
This is because of the script sandboxing feature. Any script executed from a filter is sandboxed for security purposes.
The methods gs.log, gs.logError, gs.logWarning exist in the GlideSystem sandbox but are disabled by default. To enable these methods, set the system property glide.security.sandbox_no_logging to false.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0752278