Hi everyone, I'm trying to use `CallLogging` to ad...
# ktor
g
Hi everyone, I'm trying to use
CallLogging
to add a path parameter to the MDC like in the example below but it doesn't seem to work as expected
Copy code
install(CallLogging) {
        mdc("test") { it.parameters["test"] }
    }
    routing {
        get("/{test}") {
            call.respond("MDC=${MDC.get("test")},param=${call.parameters["test"]}")
        }
    }
I couldn't find the reference in code, but my gut feeling tells me that it's not possible to register a hook that executes after the
/{test}
parameter is parsed but before the block inside
get
is executed. Is that correct?
a
Seems like that's correct.
g
Thanks for confirming it @Aleksei Tirman [JB] 🙏