Skip to content

Commit fbc9f5f

Browse files
committed
docs(jvm): update javadoc for withCoroutineLoggingContext pair
1 parent ceff2c1 commit fbc9f5f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/jvmMain/kotlin/io/github/oshai/kotlinlogging/coroutines/KotlinLoggingAsyncMDC.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public suspend inline fun <T> withLoggingContextAsync(
2929
/**
3030
* Use a pair inheriting coroutine context but not current MDC Context. Example:
3131
* ```
32-
* withLoggingContextAsync("userId" to userId) {
32+
* withCoroutineLoggingContext("userId" to userId) {
3333
* doSomething()
3434
* }
3535
* ```

src/jvmTest/kotlin/io/github/oshai/kotlinlogging/coroutines/KotlinLoggingAsyncMDCTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class KotlinLoggingAsyncMDCTest {
243243
withCoroutineLoggingContext("foo" to "bar") {
244244
requestBDuringBlock.complete(MDC.getCopyOfContextMap())
245245
}
246-
// Capture MDC state immediately after Request B's block, will NOT be empty due to the bug
246+
// will also be empty
247247
requestBAfterBlock.complete(MDC.getCopyOfContextMap())
248248
requestBDone.complete(Unit)
249249
}

0 commit comments

Comments
 (0)