我将 application.properties 与 Spring Boot (1.3 M1) 一起使用,并开始将其转换为 yaml 文件,因为它变得越来越复杂。
但我在将其转换为 yaml 时遇到问题:
logging.level.*=WARN
logging.level.com.filenet.wcm=ERROR
logging.level.de.mycompany=DEBUG
最后两行很容易翻译成这样:
logging:
level:
com.filenet.wcm: ERROR
de.mycompany: DEBUG
但是如何添加根日志记录级别的值呢?这两种方法都失败了:
失败的方法1:
logging:
level: WARN
com.filenet.wcm: ERROR
de.mycompany: DEBUG
失败的方法2:
logging:
level:
star: WARN
com.filenet.wcm: ERROR
de.mycompany: DEBUG
我读了docs http://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.html,搜索了 stackoverflow 和 google,但没有找到有效语法的示例。
您可以使用ROOT
配置根日志记录级别:
logging:
level:
ROOT: DEBUG
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)