Pushing log messages to a centralized log collector/server seems to be a more common practice, especially with microservices. This can currently be done with a syslog-handler. However new collectors like fluentd or logstash accept JSON formatted logs. Having the ability format log messages in JSON will be a requirement in order to support newer log collectors.
Note that while XML may not be a requirement it may be useful to have and is essentially free since it's not much different than the JSON formatter implementation.
WildFly JSON Formatter Issue: https://issues.jboss.org/browse/WFCORE-2951
WildFly XML formatter Issue : https://issues.jboss.org/browse/WFCORE-2952
WildFly Socket Handler Issue: https://issues.jboss.org/browse/WFCORE-2953
DEV CONTEXTS: James Perkins
AFFECTED PROJECTS OR COMPONENTS: WildFly Core
OTHER INTERESTED PARTIES:
- A log record must be well formatted in JSON or XML.
- There should be the ability to define if a stack trace is formatted as a complex object or a simple string.
- The ability to add various metadata should be to the formatted message should also be available.
- This is useful in situations where a log collector might require a special key/value pair. For example the @version=1 in logstash.
- Having the ability to override they keys/element names used when formatting the log record.
- The ability to write valid JSON or XML documents. What this means is if a JSON or XML formatter is used to write to a file, that file will not be well formed data. A separate handler would need to be created to ensure a full document is well formatted.