diff --git a/domains/android/tracking/src/main/kotlin/app/dapk/st/tracking/CrashTrackerLogger.kt b/domains/android/tracking/src/main/kotlin/app/dapk/st/tracking/CrashTrackerLogger.kt index cd2a99d..b5eaea4 100644 --- a/domains/android/tracking/src/main/kotlin/app/dapk/st/tracking/CrashTrackerLogger.kt +++ b/domains/android/tracking/src/main/kotlin/app/dapk/st/tracking/CrashTrackerLogger.kt @@ -10,6 +10,19 @@ class CrashTrackerLogger : ErrorTracker { override fun track(throwable: Throwable, extra: String) { Log.e("ST", throwable.message, throwable) log(AppLogTag.ERROR_NON_FATAL, "${throwable.message ?: "N/A"} extra=$extra") + + throwable.findCauseMessage()?.let { + if (throwable.message != it) { + log(AppLogTag.ERROR_NON_FATAL, it) + } + } + } +} + +private fun Throwable.findCauseMessage(): String? { + return when (val inner = this.cause) { + null -> this.message ?: "" + else -> inner.findCauseMessage() } } diff --git a/features/settings/src/main/kotlin/app/dapk/st/settings/eventlogger/EventLogScreen.kt b/features/settings/src/main/kotlin/app/dapk/st/settings/eventlogger/EventLogScreen.kt index 50cbfee..51cbcff 100644 --- a/features/settings/src/main/kotlin/app/dapk/st/settings/eventlogger/EventLogScreen.kt +++ b/features/settings/src/main/kotlin/app/dapk/st/settings/eventlogger/EventLogScreen.kt @@ -107,10 +107,10 @@ private fun Events(selectedPageContent: SelectedState, onExit: () -> Unit, onSel null -> "${it.time}: ${it.tag}: ${it.content}" else -> "${it.time}: ${it.content}" } - Text( text = text, - modifier = Modifier.padding(horizontal = 4.dp), + lineHeight = 14.sp, + modifier = Modifier.padding(horizontal = 4.dp).fillMaxWidth(), fontSize = 10.sp, ) }