-
Notifications
You must be signed in to change notification settings - Fork 24
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
MdcThreadLocalAccessor for SLF4J #191
Comments
What about just an additional package in the same module as an optional compile-only dependency? |
@rstoyanchev that's a good idea. I'm going in this direction. I have a design consideration at this point for the key-based approach. I can think of two options when it comes to the API: Approach 1: Accept a list of keys of type
|
I think I'll go with Approach 1. If a more flexible approach is required, the users can implement such an accessor based on how the list-based approach is implemented. Regarding my concern:
It actually applies to both approaches and I'll filter out keys that don't match both in the restoring and in capturing passes. |
Resolved by #194 |
As suggested in spring-projects/spring-boot#39299, it feels reasonable to create a new utility module for SLF4J with a
ThreadLocalAccessor
(TLA) that allows interacting with theMDC
duringThread
hops. I propose two implementations:MDC
TLA, which copies and overrides the entire contents ofMDC
-> should only be used when the user is certain no other accessor uses theMDC
MDC
TLA, which only transports specified entries acrossThread
boundaries.@ttddyy, @rstoyanchev @marcingrzejszczak @wilkinsona does this sound ok?
The text was updated successfully, but these errors were encountered: