Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
Description
Currently LogbackServiceProvider creates instance of MDCAdapter using new operator.
If a MDCAdapter was created using ServiceLoader and LogbackMDCAdapter was set as default provider, if no other was found, frameworks (such as spring webflux) could override default implementation of MDCAdapter.
Proposed change would allow frameworks to support MDC that is bound to request rather than to currently executing thread. Currently users are forced to rebind either use mapped diagnostic context other than MDC or to bind variables for every logging event
Code that needs to be changed: