mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2026-02-02 08:54:05 +01:00
Tweak network logging and json serializing
This commit is contained in:
@@ -25,15 +25,18 @@ internal class HttpProvider @Inject constructor() : Provider<Http> {
|
||||
install(JsonFeature) {
|
||||
serializer = KotlinxSerializer(
|
||||
Json {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
ignoreUnknownKeys = true
|
||||
}
|
||||
isLenient = false
|
||||
ignoreUnknownKeys = !BuildConfig.DEBUG
|
||||
allowSpecialFloatingPointValues = true
|
||||
useArrayPolymorphism = false
|
||||
}
|
||||
)
|
||||
}
|
||||
if (BuildConfig.DEBUG) {
|
||||
install(Logging) {
|
||||
level = LogLevel.HEADERS
|
||||
install(Logging) {
|
||||
level = if (BuildConfig.DEBUG) {
|
||||
LogLevel.HEADERS
|
||||
} else {
|
||||
LogLevel.INFO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user