Improving error logs

This commit is contained in:
Vitor Pamplona
2026-01-05 19:26:00 -05:00
parent 2c4279621d
commit 69c53aca06
3 changed files with 3 additions and 3 deletions
@@ -200,7 +200,7 @@ class AppModules(
val relayStats = RelayStats(client) val relayStats = RelayStats(client)
// Logs debug messages when needed // Logs debug messages when needed
val detailedLogger = if (isDebug) RelayLogger(client, true, false) else null val detailedLogger = if (isDebug) RelayLogger(client, false, false) else null
val relayReqStats = if (isDebug) RelayReqStats(client) else null val relayReqStats = if (isDebug) RelayReqStats(client) else null
val logger = if (isDebug) RelaySpeedLogger(client) else null val logger = if (isDebug) RelaySpeedLogger(client) else null
@@ -2889,7 +2889,7 @@ object LocalCache : ILocalCache {
} }
} catch (e: Exception) { } catch (e: Exception) {
if (e is CancellationException) throw e if (e is CancellationException) throw e
Log.w("LocalCache", "Cannot consume ${event.kind}", e) Log.w("LocalCache", "Cannot consume ${event.toJson()} from ${relay?.url}", e)
false false
} }
@@ -128,7 +128,7 @@ open class BasicRelayClient(
} catch (e: Throwable) { } catch (e: Throwable) {
if (e is CancellationException) throw e if (e is CancellationException) throw e
// doesn't expose parsing errors to lib users as errors // doesn't expose parsing errors to lib users as errors
Log.e("BasicRelayClient", "Failure to parse message from Relay", e) Log.e("BasicRelayClient", "Failure to parse message from Relay: $text", e)
} }
} }