Hello again Pavel, and sorry for the late response.
We can not modify the JSON decoder. However, I have researched a few approaches for your case. I think the best one is the one I'm explaining below.This workaround needs to modify the localfile option you use to collect the logs. Then, you will be able to create a custom decoder that both extract json fields and the field you want to be added to the description field.You have to add the out_format option to your localfile section, like this for example, so you can create your custom json decoder by providing the program_name that will be collected:
<out_format>$(timestamp) $(hostname) your_program_name: $(log)</out_format>
With this change (applied after restarting), you will have a log like this one (with syslog format):
Nov 29 15:15:48 managerauth your_program_name: {"app":"mynaughtyapp","log":"178.240.128.46 - - [08/Dec/2022:11:30:15 +0300] \"GET /something HTTP/1.1\" 200 1285 \"https://referrer.com/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36\""}Now it is time to create the new decoders.
<decoder name="myjson">
<program_name>your_program_name</program_name>
</decoder>
<decoder name="myjson_child">
<parent>myjson</parent>
<plugin_decoder>JSON_Decoder</plugin_decoder>
</decoder>
<decoder name="myjson_child">
<parent>myjson</parent>
<regex>{"log":"(\.*)"</regex>
<order>message_formatted</order>
</decoder>
Then, you have to add the rule that will be triggered with your custom JSON decoder.
Hope this works. Let me know if you have further questions.