Logback's XML configuration allows you easily define variables in external resources with <property resource="foo.properties" />
as spelled out in http://logback.qos.ch/manual/configuration.html#variableSubstitution. I'm in the process of converting my logback configuration to be in groovy (i.e. logback.xml -> logback.groovy) and am not finding a similarly easy way to achieve this.
I am able to achieve essentially the same behavior with normal java/groovy code
Properties props = new Properties();
props.load(new FileInputStream("foo.properties"))
def filePath = props.getProperty("filePath)
but would have hoped logback would have supplied a shorthand in the form of a logback-specific extension.
Does anybody know of a shorter way of accessing variables defined in external files and resources? Besides this, I'm finding the groovy configuration approach more concise and intuitive than XML, and also always appreciate the chance to avoid dealing with XML.