N/log Module for Script Execution Logging in NetSuite
The N/log module in NetSuite enables effective logging of script execution details, enhancing debugging and monitoring capabilities.
The N/log module is a crucial tool in NetSuite that allows developers to log details about script execution efficiently. This capability is particularly essential for debugging and maintaining scripts to ensure they function as intended.
What is the N/log Module?
The N/log module provides methods to facilitate logging within SuiteScripts. Developers can utilize both the N/log module and the global log object to record relevant execution information.
How to Access the N/log Methods
Logging methods can be accessed through the following methods:
- Use the
logobject directly for running scripts. - Use the N/log module for more detailed control and configuration.
Log entries generated using the N/log module can be viewed in various interfaces, such as:
- Execution Log subtab of the script deployment record.
- SuiteScript Debugger during script debugging sessions.
- Script Execution Logs page under Customization > Scripting > Script Execution Logs.
Guidelines for Using the N/log Module
When using the N/log module, here are some essential guidelines to keep in mind:
- Each company is limited to a maximum of 100,000 log object method calls within any 60-minute window across all scripts. Exceeding this limit will prompt NetSuite to automatically adjust the logging level for scripts detected to be logging excessively.
- Logs that are older than 30 days will be purged automatically by NetSuite.
- The storage limit for logs in the Server Script Log and Execution Log subtab is capped at 5 million per database instance. Since log persistence isn’t guaranteed, consider using custom records for long-term log storage.
- Note that the Execution Log subtab documents not only log entries but also any system messages or errors returned by NetSuite. For comprehensive error handling, refer to the N/error module.
Additional Resources
For more details on error handling and logging practices in NetSuite, consider reviewing the corresponding sections on the N/error module and its members. This can provide further insights into managing errors and ensuring better control over your scripts' execution flows.
Frequently Asked Questions (4)
How can I view logs generated by the N/log module?
What logging limits does NetSuite impose when using the N/log module?
What happens to logs that are older than 30 days in NetSuite?
Does the Execution Log subtab in NetSuite only document log entries?
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