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

Add default logger implementation #684

Merged
merged 7 commits into from
Nov 23, 2022

Conversation

HofmeisterAn
Copy link
Collaborator

What does this PR do?

Adds and assigns a default logger implementation to TestcontainersSettings.Logger. This approach does not cover all test environments. We simply forward messages to stdout, stderr and Debug. In most cases, they will pop up somewhere (the dotnet CLI won't show the messages though). Developers can always set their own implementation if necessary.

Why is it important?

Writing to console in .NET tests goes usually through the test framework and is something the developer needs to take care of. Nevertheless, writing default information to the console is super helpful for developers that are using Testcontainers and is pretty common in other languages. It is also a bit weird that everyone has to take care of it. As a 3rd party library we do not know which test framework a developer is using. Nor do we know anything about the instance to log to.

Related issues

Follow-ups

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Nov 22, 2022
@netlify
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit f0edd7f
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/637dfbdc61e08200081d1652
😎 Deploy Preview https://deploy-preview-684--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@HofmeisterAn HofmeisterAn merged commit b73e6c0 into develop Nov 23, 2022
@HofmeisterAn HofmeisterAn deleted the feature/603-output-tc-dotnet-host-information branch November 23, 2022 11:05
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

Successfully merging this pull request may close these issues.

Get information about the Testcontainers environment
1 participant