ACL script - won't show logging

aaron47
Mega Guru

My ACL script starts with debugging text like this (first 3 lines trying to print to a log):

gs.print("AARON OBRIEN - PRINT - sys_user.read");
gs.log("AARON OBRIEN - LOG - sys_user.read");
gs.addInfoMessage("AARON OBRIEN - addInfoMessage - sys_user.read");

if (gs.getUserID() == current.sys_id || gs.getUser().hasRoles())
      answer = true;
else
      answer = false;

But it won't show.   I just can't get an ACL script to show any debugging.   I am at a bit of a loss the best way to write a script (best practices) in the sys_security_acl table.

It seems to be very hard to write a script and debug it.   I am on Helsinki, so I don't believe the javascript has a debugger.

1 REPLY 1

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

A few things:



gs.print only prints in localhost_log so you would only see the message if you run in Background Scripts


gs.log will print in both localhost_log and syslog table - have you checked there and you can't find your log message?



Now, if you have your ACL on a specific table/field, why not enabling the Debug All Security and just load that table/field and see what the debug shows?