我将 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
我阅读了 文档,搜索了 stackoverflow 并进行了谷歌搜索,但没有找到有效语法的示例。
原文由 Marged 发布,翻译遵循 CC BY-SA 4.0 许可协议
您可以使用
ROOT
配置根日志记录级别: