Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug option to print log output of compose containers #685

Open
jalaziz opened this issue Dec 6, 2023 · 3 comments
Open

Debug option to print log output of compose containers #685

jalaziz opened this issue Dec 6, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@jalaziz
Copy link

jalaziz commented Dec 6, 2023

Expected Behaviour

When using DEBUG="testcontainers*", DEBUG=testcontainers:containers, or DEBUG=testcontainers:compose we should see the output of containers started via Docker Compose.

Actual Behaviour

Compose build and higher-level logs are printed, but container logs are not. This is particularly annoying when trying to debug why a container is failing to start. The logs will indicate that the container failed to start, but won't print any logs from the container.

Testcontainer Logs
...

Steps to Reproduce

  1. Create a docker compose setup with a container that fails to start
  2. Start docker compose environment with DockerComposeEnvironment(composeFilePath, fileName).up();
  3. Observe the lack of container logs

Environment Information

  • Operating System: Linux
  • Docker Version: 24.0.7
  • Node version: 16
  • Testcontainers version: 10.2.1
@cristianrgreco
Copy link
Collaborator

Sounds like a great addition, thanks for raising @jalaziz

@cristianrgreco cristianrgreco added the enhancement New feature or request label Dec 7, 2023
@wimdeblauwe
Copy link

+1 for this.

@cristianrgreco
Copy link
Collaborator

PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants