I am using http://logback.qos.ch/
I am running my java process with a parameter for example -Dproperties.url=myappproperties-production.properties or -Dproperties.url=myappproperties-development.properties depending on the environemnt it is run in.
Problem: how to make logback pick up my properties file?
If the properties file name is static I would do (works fine):
<configuration>
<property resource="myappproperties-development.properties" />
(...)
</configuration>
But I need something that is dynamic (this does not work):
<configuration>
<property resource="${properties.url}" />
(...)
</configuration>
The value of the resource file can be a property itself. In other words,
should work. BYW, set the
debugattribute of<configuration>element totrueto see logback’s internal messages on the console. Which version of logback are you using?