add support for peekByKey in MDCAdapter#462
Open
youjie23 wants to merge 1 commit intoqos-ch:masterfrom
Open
Conversation
9f6e4d6 to
46b53f6
Compare
Signed-off-by: youjie23 <youjie23@gmail.com>
ppkarwasz
approved these changes
May 23, 2025
Contributor
ppkarwasz
left a comment
There was a problem hiding this comment.
These changes look good to me, so I’d like to express my (non-binding) support for including them in SLF4J.
The absence of a peekByKey method in ThreadLocalMapOfStacks was the primary reason I had to reimplement this functionality in log4j-slf4j2-impl, so this addition is particularly welcome.
One question I have is about versioning: how are these changes intended to be adopted by implementors? As I understand it, SLF4J 2.0 implementations are expected to maintain compatibility with all 2.x versions starting from 2.0.0. Would it be more appropriate for these changes to be introduced in 2.1.0, so that only implementations explicitly targeting 2.1.x can use them?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixed #461 add support for peekByKey in MDCAdapter
1、add
peekByKeyin MDCAdapter with default implement2、add
peekByKeyinThreadLocalMapOfStacksandBasicMDCAdapter