![]() |
|
|
Issue Type:
|
Bug
|
Affects Versions:
|
1.1.2 |
Assignee:
|
Logback dev list
|
Components:
|
logback-core |
Created:
|
04/Sep/14 8:33 PM
|
Description:
|
The :- operator in bash expands the right-hand-side when the left-hand-side is undefined or empty. logback only expands the RHS when the LHS is undefined. Thus, a system property that has been defined but not assigned (e.g., -Ddefined) does not trigger default expansion, because such parameters actually have the empty string as their value.
Chapter 3 of the documentation states that this operator is based on the operator with the same name in Bash. Bash, however, expands on blank:
X=""
echo $
{X:-3}
will echo 3.
I would prefer that logback adopt the same semantics as Bash; but if this is not possible due to backward-compatibility reasons, the documentation should be updated to point out that this differs from Bash for this corner case.
|
Environment:
|
Scala/java/OSX/Linux
|
Project:
|
logback
|
Labels:
|
substitution
|
Priority:
|
Trivial
|
Reporter:
|
Jeffrey Aguilera
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev