Have a Spring Boot project and while running integration tests I get plenty of these debug messages. Which library is generating them and how to exclude them properly?
13:41:03.966 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "accept: application/json[r][n]"
13:41:03.966 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "x-tc-sid: 0c130805-5b48-4da1-acf4-45a0a4833e0f[r][n]
13:41:03.966 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "User-Agent: tc-java/1.19.0[r][n]"
13:41:03.966 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "Accept-Encoding: gzip, x-gzip, deflate[r][n]
13:41:03.967 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "Host: localhost:2375[r][n]
13:41:03.967 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "Connection: keep-alive[r][n]
13:41:03.967 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 >> "[r][n]"
13:41:03.969 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 << "HTTP/1.1 200 OK[r][n]
13:41:03.969 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 << "Api-Version: 1.41[r][n]
13:41:03.969 [ducttape-1] DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire - http-outgoing-3 << "Content-Type: application/json[r][n]"
Tried adding to the application.yml file:
logging:
level:
org.springframework: INFO
org.hibernate: WARN
com.github: WARN
org.apache.http: WARN
org.testcontainers: WARN
org.postgresql: WARN
2
Answers
Found it. It is org.rnotrth.ducttape library. To exclude its debug messages from logs just use:
The lines come from
HttpClient
. Here is the discussion on how to turn it off:Disable HttpClient logging
In my case helped adding logback.xml file with the following content: