-
-
Notifications
You must be signed in to change notification settings - Fork 590
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Proposal
The default log output from this package is quite verbose. It would be ideal if the happy path (by default) logged as little as possible and reported only errors. And for those that do want verbose output, there could be a "verbose" flag or setting that could be enabled.
TL;DR - regardless if it's opt-in or opt-out, it'd be nice for this to be configurable.
- I explicitly disabled this feature, no need for this output:
**********************************************************************************************
Ryuk has been disabled for the current execution. This can cause unexpected behavior in your environment.
More on this: https://golang.testcontainers.org/features/garbage_collector/
**********************************************************************************************
- Not really interested in the Docker engine info:
2023/12/06 21:56:59 github.com/testcontainers/testcontainers-go - Connected to docker:
Server Version: 24.0.6
API Version: 1.43
Operating System: Docker Desktop
Total Memory: 7944 MB
Resolved Docker Host: unix:///var/run/docker.sock
Resolved Docker Socket Path: /var/run/docker.sock
Test SessionID: be5bcf090d5ac5b55046d7a35a670ab7341c71919218f6ee1e64ea4190322e69
Test ProcessID: 469ede8f-9797-46fb-9ce8-eccb642a0d47
- This is cute (hehe), but not strictly necessary:
2023/12/06 21:50:06 🐳 Creating container for image postgres:16-alpine
2023/12/06 21:50:06 ✅ Container created: f40dcefbd017
2023/12/06 21:50:06 🐳 Starting container: f40dcefbd017
2023/12/06 21:50:07 ✅ Container started: f40dcefbd017
2023/12/06 21:50:07 🚧 Waiting for container id f40dcefbd017 image: postgres:16-alpine. Waiting for: &{timeout:<nil> deadline:0xc0001a6e98 Strategies:[0xc0003b1a40]}
[...]
2023/12/06 22:15:03 🐳 Terminating container: f40dcefbd017
2023/12/06 22:15:03 🚫 Container terminated: f40dcefbd017
I added a custom logger, but it only suppressed items 2 and 3 above.
type nopLogger struct{}
var _ testcontainers.Logging = nopLogger{}
func (nopLogger) Printf(string, ...interface{}) {}mdelapenya, th0th, janbiasi, Thiht, ar-sematell and 2 moreth0th and ar-sematell
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request