Better usage of Timber.

This commit is contained in:
Benoit Marty 2022-06-01 16:40:50 +02:00 committed by Benoit Marty
parent 77601f61fb
commit 4018113c88
1 changed files with 3 additions and 3 deletions

View File

@ -191,7 +191,7 @@ class UnifiedPushHelper @Inject constructor(
try { try {
pushersManager?.unregisterPusher(getEndpointOrToken().orEmpty()) pushersManager?.unregisterPusher(getEndpointOrToken().orEmpty())
} catch (e: Exception) { } catch (e: Exception) {
Timber.d("Probably unregistering a non existing pusher") Timber.d(e, "Probably unregistering a non existing pusher")
} }
} }
storeUpEndpoint(null) storeUpEndpoint(null)
@ -239,7 +239,7 @@ class UnifiedPushHelper @Inject constructor(
} }
} }
} catch (e: Exception) { } catch (e: Exception) {
Timber.d("Cannot try custom gateway: $e") Timber.d(e, "Cannot try custom gateway")
} }
storePushGateway(gateway) storePushGateway(gateway)
onDoneRunnable?.run() onDoneRunnable?.run()
@ -287,7 +287,7 @@ class UnifiedPushHelper @Inject constructor(
val parsed = URL(endpoint) val parsed = URL(endpoint)
"${parsed.protocol}://${parsed.host}/***" "${parsed.protocol}://${parsed.host}/***"
} catch (e: Exception) { } catch (e: Exception) {
Timber.e("Error parsing unifiedpush endpoint: $e") Timber.e(e, "Error parsing unifiedpush endpoint")
null null
} }
} }