[
https://issues.apache.org/jira/browse/LOG4J2-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16277404#comment-16277404
]
Mikael Ståldal commented on LOG4J2-2139:
----------------------------------------
I see. That mean that the same problem could occur with any other key in
JsonLayout, and the only way to generally solve the problem is to allow
configuring all keys.
Then I am not in favor of the "tactical" solution, since it would be a hack and
only solve a particular instance of the problem.
FWIW, it is now possible to build your own completely customizable JSON layout
with PatternLayout and the %enc{JSON} conversion.
> JSONLayout ability to rename keys in log output - particularly locationInfo
> "source"
> ------------------------------------------------------------------------------------
>
> Key: LOG4J2-2139
> URL: https://issues.apache.org/jira/browse/LOG4J2-2139
> Project: Log4j 2
> Issue Type: Improvement
> Components: Layouts
> Reporter: Daniel Kirkdorffer
> Priority: Minor
> Labels: json
>
> We ran into a problem when setting {{locationInfo}} to {{true}} when
> ingesting logs into Kibana. The problem had to do with a conflict with
> another existing key named {{"source"}} of type String, and the fact that
> {{locationInfo}} produces an Object called "source".
> So it would be nice to have a way to supply a different Object name. Perhaps
> this could be broadened so that other key names could also be renamed?
> Maybe there is a way to do this already?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)