Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

@mdpearson
Copy link
Author

@rzabson Sorry for being slow in replying -- As far as I can tell this PR can be merged at any time.

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