Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nested putCloseable invocations (issues/404) #405

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdpearson
Copy link

@mdpearson mdpearson commented Mar 15, 2024

Hi folks,

This PR fixes #404 by preventing putCloseable from clobbering a key that was present in the MDC before the putCloseable was created. It thereby allows nested putCloseables. The existing behavior surprised us when we were writing some recursive code. Let me know what you think, and thanks for making SLF4j!

@rzabson
Copy link

rzabson commented Oct 2, 2024

Hi @mdpearson!
Is this PR still valid? I see that is no conflicts and this PR could be merged easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

putCloseable should not remove the key from MDC if it was previously set to a different value
2 participants