Script Execution Logs Management in NetSuite
Manage and view script execution logs in NetSuite effectively using the N/log module and the Script Execution Logs page.
Log messages play a crucial role in tracking and debugging scripts within NetSuite. This guide covers how to effectively view and manage script execution logs using the N/log module and the Script Execution Logs page.
What is the N/log Module?
The N/log module in NetSuite provides methods for logging script execution details. You can access these methods using the global log object as well. The log messages generated appear in various places, including the Execution Log subtab of the script deployment and the SuiteScript Debugger.
Viewing Script Execution Logs
How to Access Logs
Log messages for a specific script can be found in the Execution Log of the script deployment. Additionally, all server scripts and deployed client scripts' logs are accessible in the Script Execution Logs via Customization > Scripting > Script Execution Logs. Keep in mind that logs older than 30 days may not be preserved.
Tasks You Can Perform
On the Script Execution Logs page, users can:
- Search for specific logs using various filter options such as log level, execution date range, and script name.
- Download the logs to a CSV file or an Excel spreadsheet.
- Print the list of logs.
Important Notes
- Log messages from client scripts that are attached to a form can only be viewed in the browser’s debug console.
- Server script logs and those from client scripts deployed at the record level will show in the NetSuite interface.
N/log Module Guidelines
Adhere to the following guidelines when utilizing the N/log module:
- NetSuite permits a maximum of 100,000 log object method calls in a 60-minute window across all scripts.
- The log storage limit is capped at 5 million logs for each database.
- Consider using custom records for long-term logging, as logs in the Execution Log page do not guarantee persistence.
Log Levels Explained
Different log levels filter the information captured in the logs:
| Log Level | Description | Example Use |
|---|---|---|
| Debug | Shows all messages, suitable for testing only. | Use in development. |
| Audit | Records events that occur during script processing. | Useful for auditing actions. |
| Error | Logs only unexpected errors. | Critical for error tracking. |
| Emergency | Logs only severe errors. | Important for critical failures. |
By selecting appropriate log levels, you can control the granularity of the log outputs to match your debugging or auditing needs. Be cautious with the Debug level in live environments to avoid excessive output.
Conclusion
Utilizing the N/log module effectively ensures you can monitor script execution closely and respond promptly to issues as they arise. By leveraging the Script Execution Logs page, you gain a powerful tool to improve your scripting processes in NetSuite.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Can log messages for client scripts be viewed directly in NetSuite?
How can I retain logs longer than the 30-day period?
What limits are there on using the N/log module in NetSuite?
Does the ability to use log levels apply to both server and client scripts?
Was this article helpful?
More in General
- Payment Date Prediction Feature in NetSuite
Payment Date Prediction in NetSuite utilizes machine learning to enhance financial planning by predicting invoice payment dates.
- NetSuite Ship Central Enhancements for Packing & Shipping
NetSuite Ship Central features enhance packing and shipping operations for improved efficiency and accuracy.
- New Role Setup for NetSuite AI Connector Service in 2026.1
The 2026.1 release adds a new role requirement for the NetSuite AI Connector Service, streamlining custom tool development.
- Generative AI Features in NetSuite 2026.1
Discover new generative AI features in NetSuite 2026.1, enhancing reporting, search, predictions, and development productivity.
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category