In ServiceNow, the GlideSystem (gs) object provides several methods for logging messages in server-side scripts. In a privately-scoped application, the following methods are commonly used:
A. gs.log(): This method logs a message to the system log (syslog table). It is a general-purpose logging method that allows developers to record informational messages.
E. gs.info(): This method logs informational messages to the system log. It is functionally similar to gs.log() but is specifically intended for informational messages.
The other options are not standard methods provided by the GlideSystem object:
B. gs.error(): This method does not exist in the GlideSystem API.
C. gs.debug(): This method does not exist in the GlideSystem API.
D. gs.logError(): This method does not exist in the GlideSystem API.
For more detailed information, refer to the official ServiceNow documentation on the GlideSystem API.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit