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

Volkan Yazici commented on LOG4J2-2536:
---------------------------------------

[~rgoers], shall we share this as a recommendation in the manual too?

[~liuzhongkai], is using the {{JsonTemplateLayout}} an option for you? It 
offers a richer feature set with superior customization flexilibility. AFAIK, 
{{JsonTemplateLayout}} doesn't have the problem you have mentioned.

> <JsonLayout> -> <KeyValuePair> value is output as is
> ----------------------------------------------------
>
>                 Key: LOG4J2-2536
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2536
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Layouts
>    Affects Versions: 2.11.1
>            Reporter: liuzhongkai
>            Priority: Major
>
> Use the function of the ${} placeholder in <KeyValuePair> value to output the 
> relevant value when there is a value defined by ${} in the context. If not, 
> it will be output as it is. In <PatternLayout> pattern, you can use %X{} to 
> exist. If the output related value does not exist, it is an empty string. 
> There is no such function in KeyValuePair.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to