java -jar -Dlogback.configurationFile=/opt/config/logback.xml /opt/rest.jar
Also, if you want the application to scan the config file to reflect the changes, please add scan="true" in configuration attribute.
<configuration scan="true">
...
...
</configuration>
By default logback-classic will scan the changes every one minute, but if we want to
change this then we have to add another attribute scanPeriod with the time interval and the unit as below.
java -jar -Dlogback.configurationFile=/opt/config/logback.xml /opt/rest.jar
Also, if you want the application to scan the config file to reflect the changes, please add scan="true" in configuration attribute.