The CreatorCon Call for Content is officially open! Get started here.

gs.log or gs.info is not working in script include

Ajay SIngh4
Giga Contributor

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

17 REPLIES 17

Dynamic filter:

find_real_file.png

 

SI:

find_real_file.png

pawel_st -then-
Giga Guru

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 ?

rohithp
ServiceNow Employee
ServiceNow Employee

This is because of the script sandboxing feature. Any script executed from a filter is sandboxed for security purposes.

The methods gs.loggs.logErrorgs.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