Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kotlinx-coroutines-sl4j lacks example how to update MDC withing coroutines #3280

Closed
Szer opened this issue May 11, 2022 · 0 comments
Closed
Labels
docs KDoc and API reference

Comments

@Szer
Copy link

Szer commented May 11, 2022

This page mentions that there is a way to update MDC within coroutine so updated values would propagate back to the parent context's MDC, but it lacks real code example how to achieve that.

The only phrase (which could be treated as vague by some groups of people) is that one:
Use withContext(MDCContext()) { ... } to capture updated map of MDC keys and values for the specified block of code.

My proposal would be to provide such an example (I have to find one yet!)

@qwwdfsad qwwdfsad added the docs KDoc and API reference label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs KDoc and API reference
Projects
None yet
Development

No branches or pull requests

2 participants