ai.log
Functions
Method |
Parameters |
Return Type |
Description |
---|---|---|---|
logError( summary, detail ) |
summary : Mixed
detail : Mixed |
Boolean |
Adds an event log with an ERROR log level. 'summary' is truncated at 128 characters. 'detail' is truncated at 1000 characters. All non string values are converted to strings. Log entry is added if the logging thresholds have not been breached. Returns true if logging was successful. |
logInfo( summary, detail ) |
summary : Mixed
detail : Mixed |
Boolean |
Adds an event log with an INFO log level. 'summary' is truncated at 128 characters. 'detail' is truncated at 1000 characters. All non string values are converted to strings. Log entry is added if the logging thresholds have not been breached. Returns true if logging was successful. |
logVerbose( summary, detail ) |
summary : Mixed
detail : Mixed |
Boolean |
Adds an event log with an INFO log level. 'summary' is truncated at 128 characters. 'detail' is truncated at 1000 characters. All non string values are converted to strings. Log entry is added if the logging thresholds have not been breached. Returns true if logging was successful. |
Example
// simple error log ai.log.logError('Invalid response', 'The response returned from Intacct was null. Please check that the username and password is correct.'); // optional detail is not provided. ai.log.logInfo('Intacct returned 324 rows.');
Log throttling (burst + sustained) ensures any given script cannot:
- write more than X logs per second (Burst: default is 5, configurable as AppSetting or per tenant)
- write more than X logs per hour (Sustained: default is 1000, configurable as AppSetting or per tenant)