Java – use application Properties is localized to logback.com in spring boot Location of XML
•
Java
How to use application Properties customize logback in spring boot Where is the XML?
I tried the following, but it didn't work
application. properties
logging.config = /home/dev-01/Documents/logback.xml
If logback XML is in the resource folder, it is working, but it does not work if it is outside the project
It also works if I provide environment variables
-Dlogging.config=/home/dev-01/Documents/logback.xml
Solution
The following constructs work for me (but I use relative paths instead of absolute paths):
logging.config=file:/home/dev-01/Documents/logback.xml
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码