Skip to content

MdcThreadLocalAccessor for SLF4J #191

@chemicL

Description

@chemicL

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions