From 303539f0e3af41ba97dc085d49e71caeb455020a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Robaczy=C5=84ski?= Date: Tue, 6 Jun 2023 12:08:11 +0200 Subject: [PATCH] Use logcat instead of println --- src/main/java/com/statsig/androidsdk/ErrorBoundary.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/statsig/androidsdk/ErrorBoundary.kt b/src/main/java/com/statsig/androidsdk/ErrorBoundary.kt index ea90c3c..bd52065 100644 --- a/src/main/java/com/statsig/androidsdk/ErrorBoundary.kt +++ b/src/main/java/com/statsig/androidsdk/ErrorBoundary.kt @@ -1,5 +1,6 @@ package com.statsig.androidsdk +import android.util.Log import com.google.gson.Gson import kotlinx.coroutines.CoroutineExceptionHandler import java.io.DataOutputStream @@ -22,8 +23,6 @@ internal class ErrorBoundary() { } private fun handleException(exception: Throwable) { - println("[Statsig]: An unexpected exception occurred.") - println(exception) this.logException(exception) } @@ -61,6 +60,8 @@ internal class ErrorBoundary() { } internal fun logException(exception: Throwable) { + Log.d("Statsig", "An unexpected exception occurred", exception) + try { if (apiKey == null) { return