[jira] [Commented] (LOG4J2-1866) Add default value to MdcPatternConverter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (LOG4J2-1866) Add default value to MdcPatternConverter

JIRA jira@apache.org

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

Gary Gregory commented on LOG4J2-1866:

Patches with unit tests are welcome :-)

> 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
>              Labels: converter, mdc, pattern
> 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

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