You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should also see if there are more subtypes of Message which are suitable for structured logging.
philwebb
changed the title
Add support for Log4j2's MapMessage in structured logging
Add support for Log4j2's MultiFormatStringBuilderFormattable in structured logging
Aug 27, 2024
I think we have couple of options here, we could call MapMessage.getData() and use our JsonWriter to write the result, or we could use MultiFormatStringBuilderFormattable and let it write the JSON.
Update Log4J2 `ElasticCommonSchemaStructuredLogFormatter` and
`LogstashStructuredLogFormatter` to support Log4J2 JSON structured
messages (typically `MapMessage`)
Closesgh-42034
At the moment, this code
leads to this output:
Instead, it should add "foo" and "bar" as separate keys and also preserve the datatypes.
The text was updated successfully, but these errors were encountered: