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

Woonsan Ko commented on LOG4J2-419:
-----------------------------------

As Ralph pointed out in the mailing list, it should still fall back to looking 
in the properties map if no default value is provided this way.


> Support default value for missing key in look ups with fallbacking to looking 
> in the properties map
> ---------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-419
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-419
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Woonsan Ko
>            Priority: Minor
>
> It is more useful and flexible to allow default value in the variable 
> expression itself.
> For example, ${var1:-defvalue1}, ${ctx:request_id:-defvalue2}, etc.
> This generic feature has been included in StrSubstitutor of commons-lang3 as 
> well with the following issue:
> - https://issues.apache.org/jira/browse/LANG-893
> The benefit from the feature with LANG-893 is we can use it more widely 
> whenever used in look ups.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to