Github user cakofony commented on a diff in the pull request:

    https://github.com/apache/logging-log4j2/pull/205#discussion_r208702264
  
    --- Diff: 
log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java
 ---
    @@ -355,4 +352,35 @@ public void clear() { // LOG4J2-1583
             messagePattern = null;
             throwable = null;
         }
    +
    +    @Override
    +    public MessageContentFormatter getMessageContentFormatter() {
    +        return formatter;
    +    }
    +
    +    private static final MessageContentFormatter formatter = new 
MessageContentFormatter() {
    +        private final ThreadLocal<int[]> indices = new ThreadLocal<>();
    --- End diff --
    
    What happens to these values if nested logging occurs in 
ParameterFormatter.formatMessage2? See 
[LOG4J2-1583](https://issues.apache.org/jira/browse/LOG4J2-1583) referenced on 
`ReusableParameterizedMessage.reserved`. We should write a test for this case.


---

Reply via email to