Replies: 1 comment 1 reply
-
Are you aware of MDC.putClosable ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current MDC has no clear lifecycle boundaries.
In other words, if somebody modifies MDC, then all the subsequent code inherits the values.
The current MDC is relatively easy to implement (just a HashMap would work), however
It would be nice if MDC in Slf4j was structured. In other words, code structure should provide a clear vision on the visibility scope of the values in MDC.
For instance, here's a sample of the code with the current slf4j:
If would be nice if it were forbidden to "update MDC values via MDC.put".
For example:
Beta Was this translation helpful? Give feedback.
All reactions