gmariotti
05/22/2023, 2:49 PMCallLogging
to add a path parameter to the MDC like in the example below but it doesn't seem to work as expected
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?Aleksei Tirman [JB]
05/24/2023, 6:39 AMgmariotti
05/24/2023, 6:53 AM