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 the MDC during Thread hops. I propose two implementations:
- global
MDC TLA, which copies and overrides the entire contents of MDC -> should only be used when the user is certain no other accessor uses the MDC
- key-based
MDC TLA, which only transports specified entries across Thread boundaries.
@ttddyy, @rstoyanchev @marcingrzejszczak @wilkinsona does this sound ok?
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 theMDCduringThreadhops. I propose two implementations:MDCTLA, which copies and overrides the entire contents ofMDC-> should only be used when the user is certain no other accessor uses theMDCMDCTLA, which only transports specified entries acrossThreadboundaries.@ttddyy, @rstoyanchev @marcingrzejszczak @wilkinsona does this sound ok?