记-logback日志属性配置
- logback-spring.xml
注意: 由于springboot配置文件加载顺序问题,建议将
logback.xml
重命名为logback-spring.xml
<springProperty scope="context" name="logHome" source="logging.home" defaultValue="/data/logs/app"/>
- application.properties
logging.home=/data/logs/app
参考:
Spring Boot中logback.xml配置<springProperty>出现APP_NAME_IS_UNDEFINED,附完整配置