kohttp / io.github.rybalkinsd.kohttp.interceptors / LoggingInterceptor

LoggingInterceptor

class LoggingInterceptor : Interceptor

Request Logging Interceptor

Logs HTTP requests.

Parameters

log -

function to consume log message

Sample Output: 2019-01-28T041742.885Z GET 200 - 1743ms https://postman-echo.com/get

Since
0.8.0

Author
gokul

Constructors

<init>

LoggingInterceptor(log: (String) -> Unit = ::println)

Request Logging Interceptor

Functions

intercept

fun intercept(chain: Chain): Response