I’m trying to generate a secondary log appender in Geoserver in the GELF format, so I can export it to graylog, but I can’t make the application to recognize the JsonTemplateLayout.
Until now, I tryed:
- Add log4j-layout-template-json to the project pom
- Add manually the log4j-layout-template-json jar to the catalina_baselib and catalina_baselibcontrib folders
- Add log4j-layout-template-json to a classpath clause in setenv.sh
- Decompile the jar and add the GelfLayout.json file to the log dir (and point the eventTemplateUri attribute on the JsonTemplateLayout tag of the appender to its absolute path)
In every case, the appender creates the log file, but only writes the event message on it, without the JSON formatting and extra fields set on the JsonTemplateLayout tag.
Is there anything else I can try?