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 "Andrei Ivanov (JIRA)" <ji...@apache.org> on 2016/08/24 20:43:20 UTC

[jira] [Commented] (LOG4J2-1317) Add ability for lookups to use defaults for other values than null

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

Andrei Ivanov commented on LOG4J2-1317:
---------------------------------------

anybody? :-/

> 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
>
> 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
(v6.3.4#6332)

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