问题
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