Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-479

Use of InheritableThreadLocal in Map ThreadContext is dangerous and unhelpful

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-rc1
    • Component/s: None
    • Labels:
      None

      Description

      Described here http://logging.apache.org/log4j/2.x/manual/thread-context.html
      The use of InheritableThreadLocal creates subtle and hard to track bugs while not really adding much useful. It is counterintuitive – I don't see why would anyone expect logging context to be inherited. But it breaks down completely when used with Thread Executors.

        Attachments

          Activity

            People

            • Assignee:
              remkop@yahoo.com Remko Popma
              Reporter:
              meshko MK
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: