Configuring logback with variable substitution

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 substitutionProperty file value with the java -D argument when I start up my server. Some thing lige this: java -Dlogback.config="/path/to/my/property/file" <configuration debug="true"> <substitutionProperty file=${logback.properties} />

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?
participants (1)
-
øyvind rotnes