Enable logging OkHttp traffic based on the current log level (#5750)

* Use `LogLevel` to decide whether to log the HTTP requests and responses

Added `DynamicHttpLoggingInterceptor` for this.

* Code cleanup.

* Use Timber.d

* OutOfMemoryError should not be caught. They are considered unrecoverable.

* Improve code in DefaultBugReporter.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
This commit is contained in:
Jorge Martin Espinosa 2025-11-18 15:18:27 +01:00 committed by GitHub
parent 740e486cd0
commit bf0274074d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 72 additions and 40 deletions

View file

@ -39,8 +39,5 @@ fun compressFile(file: File): File? {
} catch (e: Exception) {
Timber.e(e, "## compressFile() failed")
null
} catch (oom: OutOfMemoryError) {
Timber.e(oom, "## compressFile() failed")
null
}
}