[
https://issues.apache.org/jira/browse/LOG4J2-1317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers reassigned LOG4J2-1317:
-----------------------------------
Assignee: Ralph Goers
> Add ability for lookups to use defaults for other values than null
> ------------------------------------------------------------------
>
> Key: LOG4J2-1317
> URL: https://issues.apache.org/jira/browse/LOG4J2-1317
> Project: Log4j 2
> Issue Type: Improvement
> Components: Lookups
> Affects Versions: 2.5
> Reporter: Andrei Ivanov
> Assignee: Ralph Goers
> Priority: Major
>
> Trying to create a configuration using the ${web:contextPath} lookup worked
> fine, until I tried to use that with an empty contextPath.
> It is the case when the app is deployed as the root of the
> virtual host, case when the contextPath is an empty string (not null).
> The Interpolator is only checking for null. Likewise, StrSubstitutor will
> only use the default value if the lookup returns null, not an empty string.
> Not sure if it should be configurable somehow, maybe allow some sort of
> expression to express which value should trigger the use of the default value
> or just the empty string.
> Maybe an empty string has an actual usage in some cases.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)