log.debug(options)
Method Description |
Logs a Debug message. Debug messages appear on the Execution tab only if the Log Level on the script deployment is set to Debug. Use this method for scripts in development. |
Returns |
void |
Supported Script Types |
Client and server scripts; except client scripts that are deployed by attaching to a form (use console.log instead). For more information, see SuiteScript 2.x Script Types. |
Governance |
Amount of logging in any 60 minute period is limited. See N/log Module Guidelines. |
Module |
|
Since |
2016.1 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The text to appear in the Title column on the Execution Log tab of the script deployment. Maximum length is 99 characters. If you set this value to null, an empty string (''), or omit it, the word “Untitled” appears for the log entry. |
2016.1 |
|
any |
optional |
The text of the log message, that can include strings, variables, objects, etc. If the value is a JavaScript object type, JSON.stringify(obj) is called on the object before displaying the value. NetSuite truncates any resulting string over 3999 characters. |
2016.1 |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/log Module Script Sample.
//Add additional code
...
var myValue = 'value';
log.debug({
title: 'Debug Entry',
details: 'Value of myValue is: ' + myValue
});
...
//Add additional code