You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Volkan Yazici (Jira)" <ji...@apache.org> on 2019/10/09 11:02:00 UTC

[jira] [Created] (LOG4J2-2703) MapMessage#getFormattedMessage() incorrectly formats Object's

Volkan Yazici created LOG4J2-2703:
-------------------------------------

             Summary: MapMessage#getFormattedMessage() incorrectly formats Object's
                 Key: LOG4J2-2703
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2703
             Project: Log4j 2
          Issue Type: Bug
            Reporter: Volkan Yazici


The following code snippet

{{{color:#000080}new {color}MapMessage()}}
{{        .with({color:#008000}"key1"{color}, {color:#008000}"val1"{color})}}
{{         .with({color:#008000}"key2"{color}, Collections.singletonMap({color:#008000}"val2.1"{color}, {color:#008000}"val2.2"{color}))}}
{{        .getFormattedMessage({color:#000080}new {color}String[]{{color:#008000}"JSON"{color}});}}

produces

{{{"key1":"val1", "key2":"\{val2.1=val2.2}"}}}

whereas

{{{"key1":"val1", "key2":"\{"val2.1":"val2.2}"}}}

was expected.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)