Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude from logs in Java - DEBUG com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire

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
like image 866
kirill Avatar asked Feb 23 '26 00:02

kirill


1 Answers

See https://java.testcontainers.org/supported_docker_environment/logging_config/

    <!-- see https://java.testcontainers.org/supported_docker_environment/logging_config/ -->
    <logger name="com.github.dockerjava" level="WARN"/>
    <logger name="com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire" level="OFF"/>
like image 130
F. P. Freely Avatar answered Feb 24 '26 14:02

F. P. Freely



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!