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()
            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 levelsLog type
KusLogOptions.KusLogOptionInfoInfo level logs.
KusLogOptions.KusLogOptionErrorsError level logs and info level logs.
KusLogOptions.KusLogOptionDebugDebug level logs, error level logs, and info level logs.