NSOA.wsapi.enableLog( [ flag] )
Use this function to see the SOAP API request and response messages generated by NSOA.wsapi function calls.
Every call between enableLog(true) and enableLog(false) is logged and available for viewing in the same place as the NSOA.meta.log(severity, message) function.
This function only works in test mode and is ignored in production due to the size of the messages. See Testing and Debugging.
Parameters
-
flag {Boolean} [optional] — If true is passed then wsapi logging is enabled, if false is passed then wsapi logging is disabled, and if no parameter is passed the function returns the current wsapi logging setting.
Returns
-
Boolean true if wsapi logging is enabled and false if wsapi logging is disabled.
Units Limit
-
1 unit
For more information, see Scripting Governance.
Since
-
February 15, 2014
Example
-
Enable wsapi logging.
NSOA.wsapi.enableLog(true);
-
Disable wsapi logging.
NSOA.wsapi.enableLog(false);
Note:This is the default OpenAir behavior, that is, wsapi logging disabled.
-
Returns the Boolean state (without changing setting)
if( NSOA.wsapi.enableLog()) { // wsapi logging is enabled }
See Code Samples for more examples.