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

Use of InheritableThreadLocal in Map ThreadContext is dangerous and unhelpful

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0-rc1
    • None
    • 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

            rpopma Remko Popma
            meshko MK
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: