Hi Christian, On Thu, 12 Oct 2023 at 20:11, Christian Grobmeier <grobme...@apache.org> wrote: > I assume we could quickly make log4j safer by adding an encoder, as suggested > by Vladimir, so my question is, why should we not do it?
Yes, we can easily add an `outputFormat` attribute to the pattern layout that accepts the same values as the `%enc` pattern. This way users can easily apply JSON or XML encoding to their messages. However we should consider properly documenting PatternLayout: there should be a warning reminding users that while it is technically possible to generate a proper JSON or XML using this layout it is not the suggested way. Piotr