-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add withLoggingContextAsync
#165
Comments
Thanks! A PR is welcome, but the reason it wasn't done in the first place is that I think it will require an additional dependency on |
If there's an existing slf4j dependency, would it be too problematic to introduce a |
Yes, because that adds a dependency on |
I tried taking this up but got blocked on some dependency version resolution issue in the Kotlinx Coroutines library; I'll post an update if/when I get one. |
PR in the Kolinx Coroutines repository is up, if you'd like to take a look at it. |
...and it got rejected. @oshai looks like you'll need to create another library to contain this integration, because the Coroutine library maintainers don't want it in their code base. |
@severn-everett another option is that you'll maintain such module in another repo if you'd like. |
Probably a better way to put is whether you know how they create the integration modules in the Kotlinx Coroutines library, as I could put the code there. It could be published as something like |
Yes, if you know how to do that I'm ok with such PR. |
So the current status is: One option to try is to have the existing slf4j module with kotlin-logging dependency. |
I created an initial PR in the same module, the only caveat is that users will have to add the slf4j coroutines dep is it is provided only. |
Added in 4.0.0-beta-20. |
For coroutines to propagate MDC context properly, we need to write code as
It'd be a lot more convenient if we could add a new method that took a suspending method as a default:
and reduced this boilerplate.
Happy to submit a PR if we agree on the nomenclature
The text was updated successfully, but these errors were encountered: