[
https://issues.apache.org/jira/browse/LOG4J2-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17004243#comment-17004243
]
Ralph Goers commented on LOG4J2-1866:
-------------------------------------
Yeah, I agree with Gary. I don't like the format of
%X\{key1,key2}{default1,default2). I would prefer
%X\{key1:-default1.key2,key3:-default3}. The default separator could be
configurable.
> Add default value to MdcPatternConverter
> -----------------------------------------
>
> Key: LOG4J2-1866
> URL: https://issues.apache.org/jira/browse/LOG4J2-1866
> Project: Log4j 2
> Issue Type: Bug
> Components: Pattern Converters
> Affects Versions: 2.8.2
> Reporter: Izek Greenfield
> Priority: Major
> Labels: converter, mdc, pattern
> Attachments: Add_default_value_to_MDC_converter.patch,
> Add_documentation_.patch
>
>
> When using %X in a pattern I can't define default value if the value does not
> exist in MDC.
> I will be great to be able to define one like:
> {code:title=pattern|borderStyle=solid}
> %X{key}{hello}
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)