[英]How to configure logger level to FINEST for Wildfly Swarm
I have followed this guide for project*.yml. 我已遵循本指南中的project * .yml。
I created two files under src/main/resources : 我在src / main / resources下创建了两个文件:
project-default.yml which contains: project-default.yml ,其中包含:
logger:
level: INFO
swarm:
http:
port: 80
and project-dev.yml which contains: 和project-dev.yml ,其中包含:
logger:
level: FINEST
swarm:
http:
port: 8080
I have successfully switched between them by using the flagg -Dswarm.project.stage=dev , verifying that the port is actually changed. 我已经通过使用flagg -Dswarm.project.stage = dev成功地在它们之间切换,验证端口是否实际更改。
By some reason when using the dev -profile the application refuses to logg anything logged with logger.finest(...) while when using logger.info(...) it is logged correctly. 由于某种原因,当使用dev -profile时,应用程序拒绝记录logger.finest(...)记录的任何内容,而当使用logger.info(...)时,则记录正确。
Did I configure the logging levels incorrectly? 我是否配置了错误的日志记录级别? In that case, how should they be configured?
在这种情况下,应该如何配置它们?
This is wrong: 这是错误的:
logger:
level: WHATEVER
For logging, Wildfly Swarm relies on the logging
WildFly subsystem, similarly to other functionalities. 对于日志记录,Wildfly Swarm依赖于
logging
WildFly子系统,与其他功能类似。 So the correct YAML snippet is: 因此正确的YAML代码段是:
swarm:
logging:
...
For example: 例如:
swarm:
logging:
root-logger:
level: FINE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.