View Code? Open in Web Editor
NEW
Logging feature for ktor-client
License: MIT License
ktor-client-logging's Introduction
Warning
From version 0.3.0 all package names have been renamed to match new artifact group id.
Logging feature for Ktor-Client
HttpClient {
install(ClientLogging ) {
logFullUrl = true
logHeaders = false
logBody = false
logger = .. . // optionally your logger object
}
}
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
.
Ktor version
Ktor-Logging version
1.6
>= 0.2
1.3
0.2
1.2
0.1
ktor-client-logging's People
Contributors
Stargazers
ktor-client-logging's Issues
For some reason test sometimes fail. Possibly due to some race condition. This is especially true for GitHub pipelines.
Thanks for this library. It would be very helpful to allow different formats for the log output.
For example, imagine logging requests in the form of a curl
command-line to allow copy-pasting it to the terminal or Postman.
JSON format would also be useful, or any of a number of other standard HTTP request/response file formats.
For an example of prior work along these lines, I found https://github.com/zalando/logbook#formatting
Thanks