CAD · Question #262
In a privately-scoped application, which methods are used for logging messages in server-side scripts? Choose 2 answers
The correct answer is A. gs.debug() C. gs.error(). In privately-scoped applications, ServiceNow restricts available APIs to the scoped API set. The valid server-side logging methods for scoped applications are: gs.debug(), gs.info(), gs.warn(), gs.error(), and gs.fatal(). Both gs.debug() and gs.error() belong to this scoped…
Question
In a privately-scoped application, which methods are used for logging messages in server-side scripts? Choose 2 answers
Options
- Ags.debug()
- Bgs.logError()
- Cgs.error()
- Dgs.warn()
- Egs.log()
How the community answered
(14 responses)- A93% (13)
- B7% (1)
Explanation
In privately-scoped applications, ServiceNow restricts available APIs to the scoped API set. The valid server-side logging methods for scoped applications are: gs.debug(), gs.info(), gs.warn(), gs.error(), and gs.fatal(). Both gs.debug() and gs.error() belong to this scoped logging API. gs.log() and gs.logError() are global-scope legacy methods not available within a scoped application context, making them invalid choices here.
Topics
Community Discussion
No community discussion yet for this question.