skip to Main Content

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


  1. Chosen as BEST ANSWER

    Found it. It is org.rnotrth.ducttape library. To exclude its debug messages from logs just use:

    logging:
      level:
        org.rnorth: WARN
    

  2. 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:

    <configuration debug="false">
        <!-- definition of appender STDOUT -->
        <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
            <encoder>
                <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
            </encoder>
        </appender>
    
        <root level="INFO">
            <!-- appender referenced after it is defined -->
            <appender-ref ref="STDOUT"/>
        </root>
    </configuration>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search