Enable logs in SDK
Learn how to enable logging within the SDK.
Enable log levels to write logs from the SDK to logcat
to help you debug your Android app. You can also share these logs to the Kustomer Support team to diagnose and troubleshoot issues.
Set up log levels when you initialize the SDK with options. Use KustomerOptions.Builder().setLogLevel()
to enable logging in the SDK and to specify different log modes based on your logging requirements.
val kustomerOptions = KustomerOptions.Builder()
.setLogLevel(KusLogLevel.Debug)
Kustomer.init(
application = application,
apiKey = apiKey,
options = kustomerOptions.build()
) {
KusLog.kusLogDebug("Kustomer is initialized ${it.dataOrNull}")
}
Log level options
The Kustomer Android Chat SDK supports the following log levels:
Log levels | Log type |
---|---|
KusLogLevel.Error | Error level logs only. |
KusLogLevel.Info | Error level logs and info level logs. |
KusLogLevel.Debug | Debug level logs, error level logs, and info level logs. |
Updated 2 months ago