with Logging Context
Use a pair in MDC context. Example:
withLoggingContext("userId" to userId) {
doSomething()
}
Use a vary number of pairs in MDC context. Example:
withLoggingContext("userId" to userId) {
doSomething()
}