- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 02:53 AM
In a privately-scoped application, which methods are used for logging messages in server-side scripts? (Choose
two.)
A.gs.logError()
B.gs.log()
C.gs.debug()
D.gs.info()
E.gs.error(
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 09:38 AM
Hi @Pranai ,
Correct Answer is:-
C.gs.debug()
D.gs.info()
If my answer helped you, please mark it- solution accepted.
Regards,
Nikhil Bajaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 09:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 10:50 AM
@Pranai ,
Correct answer for this would be
C. gs.debug()
D. gs.info()
Explanation :
A. gs.logError() – Deprecated method, not supported in scoped apps.
B. gs.log() – Not supported in scoped apps (only global).
C. gs.debug() – Supported, logs debug-level messages.
D. gs.info() – Supported, logs informational messages.
E. gs.error() – Supported, but specifically for error messages (not general logging).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 12:05 PM
Hi @Pranai the question can be interpreted very widely but with a gun pointing at my head I’d go with gs.info() and gs.debug() 🧏♂️
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 12:17 PM
@Pranai
please refer to the Developer site:
Debugging Business Rules | ServiceNow Developer
The scoped GlideSystem API has logging methods:
- gs.info()
- gs.warn()
- gs.error()
- gs.debug() (must be enabled)
All of the logging methods write to the System Log. Pass strings, variables that resolve to strings, or methods that resolve to strings into the logging methods
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2025 12:42 PM
Hi @Pranai
In a custom-scoped apps, you can’t use all the global logging APIs. The supported methods for logging are
gs.info()
gs.debug()
i use these all the time
If this helps kindly accept the solutioin thanks.