gs warn/error/info compared to gs log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 09:03 AM
Only slightly embarrassed that I don't know this. I'm just updating my architecture best practices guide after stumbling on a system log that generates a few million records a day, mostly do to uncontrolled "logging".
I've always loved gs.log because the second parameter can be used as the Source column in system logs.
Does the same paradigm apply to gs.info, gs.warn, and gs.error? It doesn't look that way according to docs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 09:06 AM
Hi Robert,
those are the verbosity levels for debugging
https://developer.servicenow.com/app.do#!/event/creatorcon18/CCW1352/creatorcon_18_CCW1352_exercise_3_logging__debugging
https://community.servicenow.com/community?id=community_question&sys_id=bd71cb29db98dbc01dcaf3231f9619c6
https://www.servicenowelite.com/blog/2018/9/18/logging-for-scoped-applications
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 09:12 AM
Hi,
Hope this would help you:
(gs.error)--->Logs events that might still allow the application to continue running. Setting the log level for an application to error generates error messages only, but does not generate warn, info, or debug messages.
(gs.warn)--->Logs potentially harmful events. Setting the log level for an application to warn generates error and warn messages, but does not generate error or debug messages.
(gs.info)---->Logs informational messages that describe the progress of the application. Setting the log level for an application to info generates info, warn, and error messages, but does not generate debug messages.
(gs.debug)---->Logs informational events that are useful for debugging an application. Setting the log level for an application to debug generates info, warn, error, and debug messages.
Regards,
Munender

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 09:17 AM
Hi there,
I believe this was mentioned also in one of the scripting best practices from Steven Bell. That it indeed is not possible, like gs.log did had. I have to check the Ask the Expert sessions on that.
Did found already this nice picture from 2015 🙂
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 09:28 AM
Ah found it:
6/11 Ask the Expert: Scripting Best Practices - Part 3, w/ Steven Bell, MVP > 27:00
Steven also mentiones "downside is there's no build in location". I think that is exactly what you are mentioning 😞
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field