tree: 8d791d91f7620f2b7c9a25c96d2793b286092d4d [path history] [tgz]
  1. api/
  2. src/
  3. test/
  4. test-resources/
  5. build.gradle
  6. package.list
  7. README.md
integration/kotlinx-coroutines-slf4j/README.md

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.