Is there a way to add container logs to TestContainer logs #1211
Answered
by
HofmeisterAn
paulomorgado
asked this question in
Q&A
-
TestContainers outputs stuff like:
When running in xUnit. Is there a way to add the container logs to this output? |
Beta Was this translation helpful? Give feedback.
Answered by
HofmeisterAn
Jul 10, 2024
Replies: 1 comment 1 reply
-
Tried: .WithLogger(ConsoleLogger.Instance) But I don't see anything. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to inject a logger that uses xUnit.net's ITestOutputHelper or IMessageSink. Testcontainers' default logger will simply forward the output to the console. Depending on the test framework, more configurations may be necessary (such as with xUnit.net). See also the related PR: #1165.