Info and log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2025 09:22 AM
Apart from scope safe what are the benefits of using gs.info instead of gs.log ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2025 09:37 AM
Hello @NarendraK14
- Scope safety is the primary reason for using gs.info() over gs.log().
- In addition, gs.info() generates informational logs that are easier to filter and identify in the System Logs.
- Given the widespread use of scoped applications in ServiceNow, gs.info() is considered the preferred method for logging in most scenarios.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2025 10:22 PM
Hi @NarendraK14 check below link it will clear your question it explain everything in simple way
https://www.servicenow.com/community/itsm-forum/can-we-use-gs-log-in-scoped-application/td-p/876624
if my answer helps you mark helpful and accept solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2025 11:09 PM
gs.log() won't work in scoped app
Hence we should use gs.info()
No major benefit other than logging the information in system logs table for future troubleshooting or debugging
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader