I have enabled `development = true` in the `applic...
# ktor
i
I have enabled
development = true
in the
application.conf
file and I can see stack-traces in the console. Now I wonder is there any way to print into console all requests and responses (including returned data like JSON and http codes) ?
d
i
It’s kind of what I need: I have added
CallLogging
Copy code
install(CallLogging) {
        format { call -> call }
}
… but getting the desired output is not straight forward: 1. I need a way to have query parameters nicely formatted -
call.request.queryParameters
(
ApplicationCall
class) displays params as
io.ktor.server.netty.NettyApplicationRequest$queryParameters$1@143dccc7
string while within the
routing { get {
DSL printing parameters
call.parameters
(
ApplicationCallPipeline
class) would produce nicely formatted string
Parameters [phoneNumber=[123]]
2. I don’t see a way to retrieve values of POST parameters at all 3. I am not sure how to retrieve request and response body I would appreciate some help on this
Goal here is to have something like tis for every request and response:
Copy code
Request
- path
- parameters
- body

Response
- body