Merge pull request #4979 from element-hq/renovate/major-okhttp-monorepo

Update dependency com.squareup.okhttp3:okhttp-bom to v5
This commit is contained in:
Benoit Marty 2025-07-08 15:17:04 +02:00 committed by GitHub
commit dc4c5a561b
5 changed files with 440 additions and 292 deletions

View file

@ -7,6 +7,7 @@
package io.element.android.libraries.network.interceptors
import io.element.android.libraries.core.extensions.ellipsize
import okhttp3.logging.HttpLoggingInterceptor
import org.json.JSONArray
import org.json.JSONException
@ -28,7 +29,7 @@ internal class FormattedJsonHttpLogger(
*/
@Synchronized
override fun log(message: String) {
Timber.v(message)
Timber.v(message.ellipsize(200_000))
// 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.