LogApi (Logging APIs)
setLogLevel
Sets the log level. The valid values are debug, info(default), warning or error
LogApi.setLogLevel(logLevel)Parameters
logLevel: levelReturns
result of operationdisableAuditLog
Disables the audit log, which is used for logging to Trillo DB. By default it is enabled
LogApi.disableAuditLog()Parameters
noneReturns
result of the operationenableAuditLog
Enables the audit log. This is the default option and is used for logging into Trillo DB. Helps in isolating errors per task
LogApi.enableAuditLog()Parameters
noneReturns
result of the operationdisableLogsCollection
Disable log collections for the thread. Logs are collected for ac all and sent back to the client in the result. This is useful in debugging. By default it is disabled
LogApi.disableLogsCollection()Parameters
noneReturns
result of the operationenableLogsCollection
Enable log collections for the thread
LogApi.enableLogsCollection()Parameters
noneReturns
result of the operationlogDebug
logging of the debug and verbose messages.
LogApi.logDebug(msg) Parameters
msg: message stringReturns
result of the operationlogInfo
logging an informational and occasional message.
LogApi. logInfo(msg) Parameters
msg: message stringReturns
result of the operationlogWarn
Provides a warning message
LogApi.logWarn(msg)Parameters
msg: message stringReturns
result of the operationlogError
Provides an error message
LogApi.logError(msg)Parameters
msg: message stringReturns
result of the operationisLogLevelOn
Describes if the log level is on and returns a boolean.
LogApi.isLogLevelOn(type)Parameters
type: type string of the logging Returns
result of the operationauditLog
Sends an audit message to the workbench. It can be viewed under the task logs.
LogApi.auditLog(logObject)
or
LogApi.auditLog(String type, String summary, String ...args)Parameters
logObject: object representing dictionary
summary: a string sentence with tokens
...args: arguments of type string to be replaced
type: type string of the logReturns
result of the operation_auditLog
// Description //
LogApi._auditLog(type, summary, detail, json, action, sourceUid)Parameters
summary: string
detail: string
json: string
action: string
sourceUid: stringReturns
// Some codeauditLogInfo
This provides the information stored in the Audit log object which includes detailed log message, any associated json object, action and the parent id.
LogApi.auditLogInfo(summary, ...args) Parameters
summary: a string sentence with tokens
...args: the string values of the tokensReturns
result of the operationauditLogError
Provides information about the error in the Audit log object
LogApi.auditLogError(summary, ...args)Parameters
summary: string
...args: stringReturns
canAuditLog
For a given logging type, checks whether audit messages can be recorded
LogApi.canAuditLog(type) Parameters
type: string logging typeReturns
logToConsole
Logs the appropriate messages to the console
LogApi.logToConsole(type, msg)Parameters
type: string
msg: stringReturns
Last updated