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

ASF subversion and git services commented on LOG4J2-2962:
---------------------------------------------------------

Commit a71403ee2e5694a2699d68ddf09e8df6ccfc8b57 in logging-log4j2's branch 
refs/heads/release-2.x from Volkan Yazıcı
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=a71403e ]

LOG4J2-2962 Enrich "map" resolver by unifying its backend with "mdc" resolver.


> Make "key" optional and add "flatten" to JsonTemplateLayout "map" resolver
> --------------------------------------------------------------------------
>
>                 Key: LOG4J2-2962
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2962
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>    Affects Versions: 2.14.0
>            Reporter: Volkan Yazici
>            Priority: Minor
>              Labels: JsonTemplateLayout
>             Fix For: 2.15.0
>
>
> As [reported by Magnus Kvalheim in a log4j2-logstash-layout 
> issue|https://github.com/vy/log4j2-logstash-layout/issues/68#issuecomment-726357901],
>  there is a request as follows:
> bq. With the message resolver it's possible to set the {{fallbackKey}} - an 
> item to wishlist would be to be able to do the opposite. That is option to 
> disregard {{SimpleMessage}} (as it's already printed in the {{message}} 
> field.) Another option could be to use the mapresolver without specifying key?
> If I understand the request right, making {{key}} directive optional (hence, 
> one would be able to resolve the entire {{MapMessage}}) and adding a 
> {{flatten}} directive (similar to the one in MDC resolver) can address this 
> wish. That is,
> {code}
> config        = [ key ] , [ stringified ] , [ flatten ]
> key           = "key" -> string
> stringified   = "stringified" -> boolean
> flatten       = "flatten" -> ( boolean | flattenConfig )
> flattenConfig = [ flattenPrefix ]
> flattenPrefix = "prefix" -> string
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to