In Corda, how can I set the logging level for flow tests?

巧了我就是萌 提交于 2019-12-03 23:15:27

问题


I am running flow tests in Corda and want to set the logging level to debug to see the SQL queries executed against the vault when I use vaultService.queryBy.

How can I set the logging level in flow tests?


回答1:


You can override the flow tests' logger settings by passing -Dlog4j.configurationFile=/path/to/log4j2.xml as a VM option.

For example, in the CorDapp Example (https://github.com/corda/samples), you could enable debug-level logging in flows by:

  • Updating config/test/log4j2.xml to change the logging level from info to debug
  • Modifying the VM options setting of the Run Flow Tests - Java run configuration to -ea -javaagent:../lib/quasar.jar -Dlog4j.configurationFile=../config/test/log4j2.xml


来源:https://stackoverflow.com/questions/49262113/in-corda-how-can-i-set-the-logging-level-for-flow-tests

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