You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Izek Greenfield (JIRA)" <ji...@apache.org> on 2017/04/06 10:06:41 UTC

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

     [ https://issues.apache.org/jira/browse/LOG4J2-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Izek Greenfield updated LOG4J2-1866:
------------------------------------
    Description: 
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:
{quote}
%x{key}(hello)
{quote}

  was:
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:
%x{key}(hello)


> 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:
> {quote}
> %x{key}(hello)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org