Logging¶
Testcontainers writes logs using the debug library. This allows you to enable or disable logs at runtime, and to filter logs by namespace.
The following namespaces are available:
testcontainers*
: Show all logstestcontainers
: Show core logstestcontainers:containers
: Show logs from containerstestcontainers:compose
: Show logs from Docker Composetestcontainers:build
: Show build logstestcontainers:pull
: Show image pull logstestcontainers:exec
: Show container execution logs
Note
You can enable multiple loggers: DEBUG=testcontainers,testcontainers:exec.
You could for example run your tests with all Testcontainers logs enabled like this:
1 |
|