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

前端 未结 1 791
难免孤独
难免孤独 2021-01-07 10:44

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.quer

相关标签:
1条回答
  • 2021-01-07 11:04

    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
    0 讨论(0)
提交回复
热议问题