The organisation I work in uses service Now ,I just joined the team, My team wants me to do some research on logging in Service now.
All they want is to control the logging of scripts when they write a script on the server based on the verbosity level of the script
My understanding on logging is it the type of process that takes place on the server i.e
•if a script is not of a proper syntax it logs as a WARNING stating the compile error in the message of the log
•If something runs successfully or a process is completed, it logs as INFO with the message of what happened
•Similar logging for debug takes place, (I may be wrong about this though)
I tried searching on service now wiki,one method I found was gs.log()
I tried running some test script to log info in System Definition > Scripts - Background
Some of the various scripts I tried where
var gl = new GSLog("com.snc.sla.tasksla.log", "TaskSLA");
gl.logErr("This is an error message");
var gl = new GSLog("com.snc.sla.tasksla.log", "TaskSLA");
gl.logWarning("This is a warning message");
gs.info("This is an info log");
gs.debug("This is a debug log");
And then searched in the logs table System Logs > System Log > All
all is saw was the scripts I ran were logged as whole with INFO as the level , if the scripts had a syntax error it logged the same with WARNING level
Why doesn't it log the script line by line?
Also is there a way where I can tell Service now what script it should log based on the verbosity level?