The first blush of JTL has arrived: LOG4J2-2961
<https://issues.apache.org/jira/browse/LOG4J2-2961>. Event template
additional fields of JTL are not readable due to missing
@PluginBuilderAttribute annotations. Ralph has actually fixed this on
master, but I forgot to port it to release-2.x.
Given it is in broken state, I took the liberty and simplified it from
<JsonTemplateLayout>
<EventTemplateAdditionalFields>
<EventTemplateAdditionalField key="host" value="www.apache.org"/>
<EventTemplateAdditionalFields>
</JsonTemplateLayout>
to
<JsonTemplateLayout>
<EventTemplateAdditionalField key="host" value="www.apache.org"/>
</JsonTemplateLayout>
I added tests and applied the changes to both master and release-2.x. I
will appreciate it if somebody can take them a look.
Note that this is not a show stopper for the layout. People can still add
custom fields by providing them in the event template.