How would I configure the JBoss log system to use a custom log4j layout like log4j-json or a custom JUL formatter like logstash-util-formatter?
Edit: it looks like custom formatters are available in WildFly 8 and they are coming in EAP 6.3.
In the meantime, I think I have these options which involve bypassing JBoss logging:
- Use per-deployment logging to configure log4j myself.
- Use
jboss-deployment-structure.xml
to block EAP's log libraries and use something like logback with a JSON encoder like this.
Either way, I would only get JSON logging for the deployment itself, not for datasources and container startup. Is there another option which would allow all logging to be in JSON format?