Log4j 2
  1. Log4j 2
  2. LOG4J2-479

Use of InheritableThreadLocal in Map ThreadContext is dangerous and unhelpful

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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.

        Activity

          People

          • Assignee:
            Remko Popma
            Reporter:
            MK
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development