NSOA.meta.log(severity, message)
Use this function to store a log entry. The supported severities match those of the Log4j project.
The log indicates:
-
Severity — The supplied severity: “fatal”, “error”, “warning”, “info”, “debug”, or “trace”.
-
Timestamp — The time the message was logged.
-
Generated by — For example, whether the message was generated by your script or by SuiteProjects Pro
-
Message — The full message text.
-
User — For example, the user that was saving the form when the error occurred.
If you have a syntax error or a runtime error you will see an error in the log generated by SuiteProjects Pro.
See also Form script deployment logs.
Parameters
-
severity {string} [required] — The severity of the message: “fatal”, “error”, “warning”, “info”, “debug”, or “trace”.
Note:The “debug” and “trace” messages are only executed in test mode, see Testing and Debugging. The “debug”, and “trace” messages do not consume Scripting Governance units but are limited to a maximum of 1000 per script.
-
message {string} [required] — The message to be written to the log.
Returns
True if the function was successful and false otherwise.
Since
August 17, 2013
Example
This sample writes the ‘error’ severity message 'Form error - travel date is after receipt date' to the log.
NSOA.meta.log('error', 'Form error - travel date is after receipt date');
See also NSOA.meta.alert(message).
See Code Samples for more examples.