Is there a way to include the call id in the logba...
# ktor
r
Is there a way to include the call id in the logback pattern? Would make tracing calls a lot easier. Found the answer in the
Monitoring > call-logging
docs rather than the
Creating and configuring a server > logging docs
Copy code
install(CallId) {
    generate { UUID.randomUUID().toString() }
}
install(CallLogging) {
    mdc("callid") { call -> call.callId }
}
<pattern>%d{YYYY-MM-ddTHH:mm:ss.SSS} [%mdc{callid}] %-5level %logger{36} - %msg%n</pattern>