vy opened a new issue, #4141:
URL: https://github.com/apache/logging-log4j2/issues/4141
`StructuredDataMessage` implements `MultiFormatStringBuilderFormattable` and
returns `XML` as one of its supported encodings. When `StructuredDataMessage`
is serialized to XML, it omits the `message` provided at construction:
```
new StructuredDataMessage("an id", "a message", "a type");
```
gets encoded to XML as:
```
<StructuredData>
<type>a type</type>
<id>an id</id>
<Map>
</Map>
</StructuredData>
```
whereas, the following was expected:
```
<StructuredData>
<type>a type</type>
<id>an id</id>
<Map>
<Entry key="message">foo</Entry>
</Map>
</StructuredData>
```
There is another problem: What if the user _also_ explicitly provides a
`message` entry:
```
var sdm = new StructuredDataMessage("an id", "a message", "a type");
sdm.put("message", "foo");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]