diff --git a/shared/src/androidMain/kotlin/bou/amine/apps/readerforselfossv2/utils/DateUtils.kt b/shared/src/androidMain/kotlin/bou/amine/apps/readerforselfossv2/utils/DateUtils.kt index 350aed2..bbb23c9 100644 --- a/shared/src/androidMain/kotlin/bou/amine/apps/readerforselfossv2/utils/DateUtils.kt +++ b/shared/src/androidMain/kotlin/bou/amine/apps/readerforselfossv2/utils/DateUtils.kt @@ -26,7 +26,7 @@ actual class DateUtils { throw Exception("Unrecognized format for $dateString") } } catch (e: Exception) { - Napier.e(e.stackTraceToString(), tag = "DateUtils.parseDate") + Napier.e("parseDate failed", e, tag = "DateUtils.parseDate") "1991-03-18T03:00:00" } diff --git a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt index c97d9e6..5a7433c 100644 --- a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt @@ -422,7 +422,7 @@ class Repository( val response = api.login() result = response.isSuccess == true } catch (cause: Throwable) { - Napier.e(cause.stackTraceToString(), tag = "RepositoryImpl.login") + Napier.e("login failed", cause, tag = "RepositoryImpl.login") } } return result @@ -436,7 +436,7 @@ class Repository( // a random rss feed, that would throw a NoTransformationFoundException fetchFailed = !api.getItemsWithoutCatch().success } catch (e: Throwable) { - Napier.e(e.stackTraceToString(), tag = "RepositoryImpl.shouldBeSelfossInstance") + Napier.e("checkIfFetchFails failed", e, tag = "RepositoryImpl.shouldBeSelfossInstance") } } @@ -451,7 +451,7 @@ class Repository( Napier.e("Couldn't logout.", tag = "RepositoryImpl.logout") } } catch (cause: Throwable) { - Napier.e(cause.stackTraceToString(), tag = "RepositoryImpl.logout") + Napier.e("logout failed", cause, tag = "RepositoryImpl.logout") } appSettingsService.clearAll() } else {