How can I customize the location of logback.xml in Spring Boot using application.properties?
I tried below but is not working.
application.properties
logging.config = /home/dev-01/Documents/logback.xml
It is working if the logback.xml is located in the resource folder, but not working if it is located outside the project.
It is also working if the I supply as an environment variable like
-Dlogging.config=/home/dev-01/Documents/logback.xml
Below construct worked for me (but I used relative path instead of absolute):
logging.config=file:/home/dev-01/Documents/logback.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With