You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, several users have asked to be able add custom MDCAdaper implementations. How should these implementations be supported?
Here is are some possible approaches to this problem:
add a new methods such as addMDCAdaptergetMDCAdapters in the org.slf4j.MDC class
add a new method such as addNextAdapter in MDCAdapter interface to allow chaining of adapters.
Approach 1 offers a relatively simple API but at the cost of exposing implementation specific details at the user level.
Approach 2 hides implementation specific details from the user but at the cost of a slightly more complex API.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
At present time, the org.slf4j.MDC class supports a single MDCAdapter implementation.
However, several users have asked to be able add custom MDCAdaper implementations. How should these implementations be supported?
Here is are some possible approaches to this problem:
addMDCAdapter
getMDCAdapters
in theorg.slf4j.MDC
classaddNextAdapter
inMDCAdapter
interface to allow chaining of adapters.Approach 1 offers a relatively simple API but at the cost of exposing implementation specific details at the user level.
Approach 2 hides implementation specific details from the user but at the cost of a slightly more complex API.
Beta Was this translation helpful? Give feedback.
All reactions