logging-log4j-dev mailing list archives

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

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

Matt Sicker commented on LOG4J2-1317:

Would you be able to submit a patch or pull request?

> 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

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

View raw message