What is the difference between gs.log and GsLog?? - Please explain me in detail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2014 02:19 AM
What is the difference between gs.log and GsLog?? - Please explain me in detail
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2014 02:26 AM
Hi Chandra,
Below is the basic difference:
GSLog : GSLog is a script include which makes logging and debugging from script easier by implementing levels of log output, selectable by per-caller identified sys_properties values.
gs.log : gs.log("Hello World"); Will write to the database and the log file. Too much of this can adversely affect performance
You can find more information about GSLog on below wiki link:
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2014 02:39 AM
What do you mean by "selectable by per-caller identified sys_properties values." - Please explain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2014 09:58 AM
Hi Chandra,
Below is an example of GSLog:
var gl = new GSLog("com.snc.sla.tasksla.log", "TaskSLA");
gl.logWarning("This is a warning message");
Logging of Logs is depends on the value of System Property.
As the best Practise, we should used GSLog only for debugging. As we can turn On or Off logs messages using System Property.
Hope this answers your question
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2014 02:40 AM
GsLog is what Solutioner has said: A Script Include
gs.log is basically a Utility Function available with the GlideSystem Object. You may like to read more about GlideSystem here: GlideSystem - ServiceNow Wiki
Its usage has already been described above in the Thread.
Thanks,
Subhajit