Using log4j 1.2.17 and com.spotify.docker-client 6.1.1 in Java8. If i set log4j root log level in DEBUG, then http-api of docker client write in log many messages like
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:113 - http-outgoing-13 << HTTP/1.1 200 OK
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Api-Version: 1.37
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Docker-Experimental: false
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Ostype: linux
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Server: Docker/18.03.1-ce (linux)
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Date: Thu, 04 Oct 2018 06:42:50 GMT
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Content-Type: text/plain; charset=utf-8
09:42:50,624 DEBUG jersey-client-async-executor-0 headers:onResponseReceived:116 - http-outgoing-13 << Transfer-Encoding: chunked
I don`t understand how to disable it. All my tries:
log4j.rootLogger=DEBUG, stdout
log4j.logger.jersey-client-async-executor-0=INFO
log4j.logger.com.sun.jersey=INFO
log4j.logger.com.spotify=INFO
And this doesn't stop it. How can i disable DEBUG-loggin of jersey-client-async-executor-0 ? Thanks.
You are setting the log level to Debug and then you are logging on the logger the
jersey-client
, thus it is getting set on Debug level as well.Either set your rootlogger to a different level or dont add the jersey-client to the logger.