diff --git a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnResponseLogger.kt b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnResponseLogger.kt index 3e89302..c4f0ce9 100644 --- a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnResponseLogger.kt +++ b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnResponseLogger.kt @@ -10,7 +10,8 @@ class BahnResponseLogger : ResponseErrorHandler { } override fun handleError(response: ClientHttpResponse) { - log.debug { "Response: $response" } + val body = response.body.bufferedReader().use { it.readText() } + log.debug { "Status code [${response.statusCode.value()}], status text [${response.statusText}], body [$body]" } } companion object {