Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 tostdout
,stderr
andDebug
. In most cases, they will pop up somewhere (thedotnet
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