
[ http://jira.qos.ch/browse/LBCORE-230?page=com.atlassian.jira.plugin.system.i... ] Eric Sirianni commented on LBCORE-230: -------------------------------------- I guess I can buy your scoping reasoning from an academic perspective. But these property resolution rules don't seem particularly useful. Take Look at how Ant works for example: "You can also set properties on the command line. This can be done with the -Dproperty=value option, where property is the name of the property, and value is the value for that property. If you specify a property that is also set in the build file (see the property task), **the value specified on the command line will override the value specified in the build file**." http://ant.apache.org/manual/running.html I can't think of any useful reason why you'd want a hardcoded property value in a logback.xml file (local scope as you call it) to override a value for that same property specified in a config file or on the commandline. <property name="USER_HOME" value="/home/sebastien" /> What does that buy me as a developer as opposed to just hardcoding the value "/home/sebastien" everywhere? Is it just defining a named constant for the value? That's not particularly exciting.
System Properties should override properties in logback.xml (not the other way around) --------------------------------------------------------------------------------------
Key: LBCORE-230 URL: http://jira.qos.ch/browse/LBCORE-230 Project: logback-core Issue Type: Improvement Affects Versions: 0.9.29 Reporter: Eric Sirianni Assignee: Logback dev list Priority: Minor
From the logback configuration guide (http://logback.qos.ch/manual/configuration.html) "The property is not declared in the configuration file, thus logback will look for it in the System properties. Java system properties can be set on the command line. " I believe the precedence should be reversed. Typically, system properties are used to *override* default values of properties that are specified in XML files or property files (typically checked into source control). Please consider this enhancement. For backwards compatibility you may want to add an option to toggle the precedence ordering.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira