testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

chore: honour go toolchain's verbose flag to print out logs

Open mdelapenya opened this issue 1 year ago • 1 comments

  • chore: disable logging if the "-v" flag is not present
  • chore: print ryuk is disabled using the logger

What does this PR do?

This PR checks if the verbose flags (v or -test.v) are present in the current execution, keeping the default logger if it's passed. Else, a NOOP logger will be used for all the downstream calls.

If a container defines its own logger in the container request struct, it will be honored.

Why is it important?

Control the verbosity using standard Go flags

Related issues

  • Closes #1984

mdelapenya avatar Jul 04 '24 16:07 mdelapenya