Cleanup unused strings, fix a few accidental unused strings

This commit is contained in:
Jobobby04
2022-12-03 14:37:04 -05:00
parent 0784629cbb
commit d8ba1774cb
12 changed files with 16 additions and 225 deletions
@@ -8,12 +8,14 @@ import okhttp3.logging.HttpLoggingInterceptor
fun OkHttpClient.Builder.maybeInjectEHLogger(): OkHttpClient.Builder {
if (EHLogLevel.shouldLog(EHLogLevel.EXTREME)) {
val xlogBorder = XLog.tag("||EH-NETWORK-JSON").build()
val xlogNoBorder = XLog.tag("||EH-NETWORK-JSON").disableBorder().build()
val logger: HttpLoggingInterceptor.Logger = HttpLoggingInterceptor.Logger { message ->
try {
Json.decodeFromString<Any>(message)
XLog.tag("||EH-NETWORK-JSON").json(message)
xlogBorder.json(message)
} catch (ex: Exception) {
XLog.tag("||EH-NETWORK").disableBorder().d(message)
xlogNoBorder.d(message)
}
}
return addInterceptor(HttpLoggingInterceptor(logger).apply { level = HttpLoggingInterceptor.Level.BODY })