Logback configuration via jvm argument

Sai prateek picture Sai prateek · Oct 22, 2013 · Viewed 22.7k times · Source

How can we load logback.xml via jvm argument if this is not present in project classpath?

I'm using

 -Dlogback.configuration=file:C:\logbacs\logback.xml 

but this is not working.

Answer

Sai prateek picture Sai prateek · Oct 22, 2013

I found the solution

-Dlogging.config="C:\logbacs\logback.xml"

is working fine for me.

Updated because the previous answer was obsolete