In spring-boot application, I am trying to config a default dir for logback.
Usually, in logback.xml I would config it this way:
<property name="logFile.dir" value="${catalina.home:-/tmp}/logs" />
The separator is :-.
But, in application.properties:
I have to config it this way:
logging.file=${catalina.home:/tmp}/logs/sportslight.log
Need to change the separator from :- to :.
The questions are:
- In
logback.xml, which is the correct separator,:-or:? - In
application.properties, why only:works, is it because spring-boot would handle it first before pass the value to logback?