mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
Avoid crash for long logs.
This commit is contained in:
@@ -38,7 +38,8 @@ internal class FormattedJsonHttpLogger(
|
||||
*/
|
||||
@Synchronized
|
||||
override fun log(message: String) {
|
||||
Timber.v(message)
|
||||
Timber.v(message.take(20_000))
|
||||
if (message.length > 20_000) return
|
||||
|
||||
// Try to log formatted Json only if there is a chance that [message] contains Json.
|
||||
// It can be only the case if we log the bodies of Http requests.
|
||||
|
Reference in New Issue
Block a user