onflow/cadence-tools

[Test] Allow custom logger for the test runner

Closed this issue · 0 comments

Issue to be solved

Currently, there is no way to provide a custom logger to the test runner and this defaults to stdio. This is problematic because sometimes developers may want to suppress, format, or display logs in a different way. (Currently, this is creating an issue in Flow CLI onflow/flow-cli#1324).

This is related to the bug encountered in #265

Suggested Solution

Add an additional builder function, WithLogger which allows the developer to specific a custom zerolog context. The default logger may either be stdio or suppressed.