Limit Logging

Writing values to the system info, warning, or error logs can be an excellent troubleshooting and debugging step during development. For example, if a server-side script is not executing as expected, you might use gs.info() or gs.log() to log the values of some variables to the system logs, or log some messages to help you trace the execution path. However, often developers forget to go back through all of the scripts they modified once the issue is resolved, and remove their log statements. This can clutter the production logs, and increase the size of the log file which impacts performance and makes detecting issues in production by monitoring the logs, more difficult.

A good way to resolve this issue, would be to create a ...

Get Learning ServiceNow now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.