How to control log level when using Gradle Test Runner

99封情书 提交于 2020-02-06 08:43:06

问题


My Setup:

  • OS: Windows 10
  • Corda: 4.1 (I always start with the template.)
  • IDE: IntelliJ 2019.1.3
  • Language: Java

In 2018 Joel wrote how to control logging levels when performing Flow tests: link

You can override the flow tests' logger settings by passing:

-Dlog4j.configurationFile=/path/to/log4j2.xml

...as a VM option

This works great if you are using JUnit in IntelliJ. However, the Corda documentation recommends that you use the Gradle Test Runner to perform tests: link

When I switch to using the Gradle Test Runner the same VM Option has no effect on the logging levels.

How do I control the logging level if I am using the Gradle Test Runner?

来源:https://stackoverflow.com/questions/58457132/how-to-control-log-level-when-using-gradle-test-runner

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!