[logback-user] Configuring logback with variable substitution

øyvind rotnes rotnes at gmail.com
Wed May 14 19:14:39 CEST 2008


Hi people!
I have an issue.
I want to use variable substitution to configure logback.xml, which
works fine. But I also want to set the
substitutionProperty file value with the java -D argument when I start
up my server.

Something like this:
java -Dlogback.config="/path/to/my/property/file"

and then in logback.xml :

<configuration debug="true">
<substitutionProperty file=${logback.properties} />

But this did not work. I also tried <substitutionProperty
file="${logback.properties}" />
and
<configuration debug="true">
<substitutionProperty>
<file>${logback.properties}<file/>
</substitutionProperty>

Is it not possible to define the subistutionfile with a system property?



More information about the Logback-user mailing list