logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51612] LoggingEvent can contain wrong thread name in multithreaded environment
Date Mon, 08 Aug 2011 03:18:17 GMT

Curt Arnold <carnold@apache.org> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #1 from Curt Arnold <carnold@apache.org> 2011-08-08 03:18:17 UTC ---
The code is behaving as designed, though it was designed for a far earlier era.
 Designing for concurrency is one of the prime motivations for the log4j 2
effort.  Improving concurrency in log4j 1.x is a minefield with ample
opportunity for unintended consequences.

There are (at least were) substantial performance benefits to avoid copying
thread state information into the logging event.  The following fragment of
AsyncAppender shows how it forces the retrieval of state information so that
the logging event has a fixed state before it is made visible to other threads.

    // Get a copy of this thread's MDC.
    if (locationInfo) {

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message