Kotlin optimization form #1435
This commit is contained in:
parent
084b2e8e04
commit
eb7ee49096
@ -66,9 +66,9 @@ class FormattedJsonHttpLogger : HttpLoggingInterceptor.Logger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun logJson(formattedJson: String) {
|
private fun logJson(formattedJson: String) {
|
||||||
val arr = formattedJson.split("\n".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
|
formattedJson
|
||||||
for (s in arr) {
|
.lines()
|
||||||
Timber.v(s)
|
.dropLastWhile { it.isEmpty() }
|
||||||
}
|
.forEach { Timber.v(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user