/ktor-client-logging

Logging feature for ktor-client

Primary LanguageKotlinMIT LicenseMIT

Ktor Client Logging

Build CodeFactor ktlint

Maven Central GitHub

Warning
From version 0.3.0 all package names have been renamed to match new artifact group id.

Logging feature for Ktor-Client

Installation

HttpClient {
    install(ClientLogging) {
        logFullUrl = true
        logHeaders = false
        logBody = false
        logger = ... // optionally your logger object
    }
}

Experimental status

Logging for Ktor Client uses some experimental Ktor API and therefore unfortunately there is no guarantee that there will no compatibility breaks between Ktor versions.

As a matter of fact, that’s exactly what happened between versions 1.2 and 1.3.

Keep that in mind.

Ktor support

Ktor version Ktor-Logging version

1.6

>= 0.2

1.3

0.2

1.2

0.1