Stephen Connolly created LOG4J2-763:
---------------------------------------

             Summary: Async loggers convert message parameters toString at log 
record writing not at log statement execution
                 Key: LOG4J2-763
                 URL: https://issues.apache.org/jira/browse/LOG4J2-763
             Project: Log4j 2
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Stephen Connolly


http://javaadventure.blogspot.com/2014/07/log4j-20-async-loggers-and-immutability.html

TL;DR When using parameterized messages, the toString() method of the log 
messages is not called when the log message is enqueued, rather after the log 
message has been dequeued for writing. If any of the message parameters are 
mutable, they can thus have changed state before the log message is written, 
thus resulting in the logged message content being incorrect.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to