logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Ivanov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1317) Add ability for lookups to use defaults for other values than null
Date Thu, 25 Aug 2016 16:37:20 GMT

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

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

Uf, it's problematic with the amount of time I have :(

> 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


Mime
View raw message