testcontainers/testcontainers-clj

Test container logging is very verbose

arichiardi opened this issue · 2 comments

Hi there! After updating to the latest version of clj-test-containers we started to receive a miriad of logging both locally and in CI.

An example:

2021-10-27T16:06:23.0077797Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << HTTP/1.1 200 OK
2021-10-27T16:06:23.0078682Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Api-Version: 1.39
2021-10-27T16:06:23.0079623Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Api-Version: 1.39
2021-10-27T16:06:23.0080595Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Content-Type: application/json
2021-10-27T16:06:23.0081910Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Content-Type: application/json
2021-10-27T16:06:23.0082907Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Docker-Experimental: false
2021-10-27T16:06:23.0084004Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Docker-Experimental: false
2021-10-27T16:06:23.0085111Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Ostype: linux
2021-10-27T16:06:23.0085912Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Ostype: linux
2021-10-27T16:06:23.0087162Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Server: Docker/18.09.5 (linux)
2021-10-27T16:06:23.0088147Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Server: Docker/18.09.5 (linux)
2021-10-27T16:06:23.0089136Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Date: Wed, 27 Oct 2021 16:06:13 GMT
2021-10-27T16:06:23.0090283Z [APP] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.headers http-outgoing-2 << Date: Wed, 27 Oct 2021 16:06:13 GMT
2021

I am not sure what the shaded mechanism is but if I had to guess it seems like some Java packages have been wrapped up.

I was wondering if you folks are seeing the same and how to turned them off (I tried logback-test.xml to no avail).

I take this back, adding the following to logback-test.xml solved it:

  <logger name="org.testcontainers" level="INFO"/>
  <logger name="com.github.dockerjava" level="WARN"/>

I saw that there is some TODO for slf4j log output and that is indeed a very nice feature to have. Looking forward and closing this one for now.

Thanks for mentioning and proposing a solution!