Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 756 Bytes

File metadata and controls

26 lines (16 loc) · 756 Bytes

Module kotlinx-coroutines-slf4j

Integration with SLF4J MDC.

Example

Add MDCContext to the coroutine context so that the SLF4J MDC context is captured and passed into the coroutine.

MDC.put("kotlin", "rocks") // put a value into the MDC context

launch(MDCContext()) {
   logger.info { "..." }   // the MDC context will contain the mapping here
}

Package kotlinx.coroutines.slf4j

Integration with SLF4J MDC.