[logback-user] JsonEncoder

Ceki Gülcü ceki at qos.ch
Wed Jun 21 11:27:49 CEST 2023

Hello Bruno,

Thank you for your kind words. They are much appreciated.

Can you please create the a jira issue asking for a formatted message in
JsonEncoder as an option?

Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

On 6/20/2023 8:46 PM, Bruno Ballekens via logback-user wrote:
> Hi,
> i like very much the JsonEncoder that you've added to 1.4.8.
> Previously we worked with
> ch.qos.logback.contrib.jackson.JacksonJsonFormatter, but great to see it
> now natively supported.
> However, i've stumbled upon the fact that it does not put the "formatted
> message" in the json payload. It puts the message and the argument array.
> Some of the libs we use, dolog using the message format based methods,
> which now look strange in our log aggregation system (sometimes we even
> see {} as the message with then the actual message as the single member
> of the argument array).
> I checked the code of the JsonEncoder and do not see any configuration
> based way of having the formatted in the json payload (preferably with
> the "message" key).
> Do you foresee something like this in the future ? 
> Or do we need to subclass the JsonEncoder ?
> Thanks
> Regards

More information about the logback-user mailing list