[ 
https://issues.apache.org/jira/browse/LOG4J2-667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418616#comment-15418616
 ] 

Mikael Ståldal commented on LOG4J2-667:
---------------------------------------

I would say that the purpose of the JsonLayout in Log4j is to provide the log 
event in a format which is standardized by Log4j. If we start to add a lot of 
customization options, I am afraid that we will end up with something which is 
either hard to maintain or inefficient. (Same goes for and CsvLogEventLayout, 
XmlLayout, YamlLayout and SerializedLayout.)

If you want a custom format, we provide PatternLayout and the possibility to 
develop your own Layout plugin.

We do also provide some layouts for logging formats defined elsewhere: 
GelfLayout, SyslogLayout, RFC5424Layout. (If you miss any such format, feel 
free to suggest that we add a Layout for it.)

If you want a JSON based format for a multi-language micro-services world, 
maybe try GelfLayout?


> Add customization for JSON Layout keys and values
> -------------------------------------------------
>
>                 Key: LOG4J2-667
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-667
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Danny Sullivan
>              Labels: JSON
>
> I really like the JSON Layout feature as it's easily parsed by splunk. I 
> would like to see more customization on the type of information that's 
> included in each json message, similar to the Pattern Layout such as MDC and 
> NDC, the locations etc. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to