Why would you expect the listener created by LoggingListener.forJavaUtilLogging() to log anything at log level INFO... when the documentation explicitly states the following? 创建一个LoggingListener,它使用FINE的日志级别委派给java.util.logging.Logger. Create a LoggingListener which delegates to a java.util.logging.Logger using a log level of FINE.如果您希望LoggingListener在级别INFO上记录消息,则必须使用其他工厂方法来创建它,该方法接受像LoggingListener.forJavaUtilLogging(Level.INFO)这样的日志级别.If you want the LoggingListener to log messages at level INFO, you'll have to create it using the other factory method which accepts a log level like this LoggingListener.forJavaUtilLogging(Level.INFO). 这篇关于使用JUnit 5发现测试不会执行LoggingListener(TestExecutionListener的实现)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-03 19:36
查看更多