Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-472

Should MDCClosable put the old value back into the MDC?

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • None

    Description

      I'm not actually sure about this myself.

      Currently when you close the MDCClosable it will remove the value from the MDC. The close method doesn't put things back to the way they were.

      The put method called when MDCClosable is created returns void so this isn't a trivial thing to implement. I imagine that different logging providers might not return the old value like the put method on the map.

      Should something like this be implemented?

      By trivial I mean if we have to call get every time an MDCClosable is created there might be a performance impact or something.

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            sixcorners Stephen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: