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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.