Debug logging is an optional, yet critical SDK feature. By enabling logging, you can ensure that the SDK is working as intended. The following table explains levels of logging available and the purpose they serve:
This log level provides the details about unrecoverable errors that occurred during SDK implementation.
In addition to the detail from Error log level, Warning provides error information during SDK integration. This log level might indicate that a request has been made to the SDK, but the SDK might be unable to perform the requested task. For example, this log level might be used when catching an unexpected, but recoverable, exception and printing its message.
In addition to detail from the Warning log level, Debug also provides high-level information about how the SDK processes network requests/responses data.
In addition to detail from the Debug level, Verbose provides detailed, low-level information about how SDK processes database interactions and SDK events.
To enable debug logging, use the following methods:
[ACPCore setLogLevel:ACPMobileLogLevelDebug];// [ACPCore setLogLevel:ACPMobileLogLevelVerbose];// [ACPCore setLogLevel:ACPMobileLogLevelWarning];// [ACPCore setLogLevel:ACPMobileLogLevelError];
ACPCore.setLogLevel(ACPMobileLogLevel.debug)// ACPCore.setLogLevel(ACPMobileLogLevel.verbose)// ACPCore.setLogLevel(ACPMobileLogLevel.warning)// ACPCore.setLogLevel(ACPMobileLogLevel.error)
Controlling the log level of the SDK
ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelError, successCallback, errorCallback);ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelWarning, successCallback, errorCallback);ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelDebug, successCallback, errorCallback);ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelVerbose, successCallback, errorCallback);