Refactor logging code to suppress debug logs in tests
Properly fixes #406 (closed) .
This was a bit more intricate than expected as previously we were not taking into account the LogLevel
from our settings file(s), but now we do. This allows us to suppress debug logs in tests which would otherwise completely "flood" normal test output, making reading it unnecessarily hard.
In case the debug logs are needed/desired for a test run, they can be brought back using the GGTX_LOG_LEVEL
env var, like in:
nix-shell --run "GGTX_LOG_LEVEL=debug cabal v2-test --test-show-details=streaming"