Debugging

If you want to see the logs within the SDK, use the following code:

// default is 'false'
val snsSdkBuilder = SNSMobileSDK.Builder(this).withDebug(true)
SNSMobileSDK.SDK snsSdk = new SNSMobileSDK.Builder(requireActivity()).withDebug(true);

๐Ÿ‘

Tip

Do not forget to disable the flag for the release build.

Custom Logger

You can provide SumSub Android SDK with custom logger using the .withLogTree method. Create your custom logger, for example:

class CustomTree : Logger {
  override fun d(tag: String, message: String, throwable: Throwable?) {
    Log.d(tag, message, throwable)
  }

  override fun e(tag: String, message: String, throwable: Throwable?) {
    Log.e(tag, message, throwable)
  }

  override fun i(tag: String, message: String, throwable: Throwable?) {
    Log.i(tag, message, throwable)
  }

  override fun v(tag: String, message: String, throwable: Throwable?) {
    Log.v(tag, message, throwable)
  }

  override fun w(tag: String, message: String, throwable: Throwable?) {
    Log.w(tag, message, throwable)
  }

}

Right now, you can use your custom log tree:

val snsSdkBuilder = SNSMobileSDK.Builder(this).withLogTree(CustomTree())