Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-355

Logback MDC context is not inherited by child threads.

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • logback-classic
    • None
    • Operating System: Linux
      Platform: PC

    • 64

    Description

      As stated in the javadoc documentation, the ch.qos.logback.classic.MDC should be inherited by a child thread:

      "A child thread automatically inherits a copy of the mapped diagnostic context of its parent."

      But the context is NOT ihnerited by child threads - the context HashMap is stored in the ThreadLocal, not in the InheritableThreadLocal.

      Regards,
      Bendis

      Attachments

        Activity

          People

            logback-dev Logback dev list
            bendis@bendis.cz Martin Benda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: