1

I am getting these log messages repeatedly..

12:31:39.085 [localhost-startStop-1-SendThread(localhost:2182)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x14f7213a94000bc after 0ms

12:31:39.142 [localhost-startStop-1-SendThread(localhost:2182)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x14f7213a94000be after 0ms

12:31:39.142 [localhost-startStop-1-SendThread(localhost:2182)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x14f7213a94000bd after 0ms

12:31:39.183 [localhost-startStop-1-SendThread(localhost:2182)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x14f7213a94000bf after 0ms

12:31:39.183 [localhost-startStop-1-SendThread(localhost:2182)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x14f7213a94000c0 after 0ms

12:31:39.256 [localhost-startStop-1-SendThread(localhost:2182)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x14f7213a94000c1 after 0ms

I changed my log4j2.xml with root level = "OFF" as well.

How do I turn this logging off ?

Aragorn
  • 477
  • 1
  • 8
  • 12

2 Answers2

1

You could add another logger in your log4j2.xml to change the log level for zookeeper. Assuming you have already defined Appender named file, you can add the Logger section as shown below

<Appenders>
  <RollingFile name="file" ...
   ...
  </RollingFile>
</Appenders>
<Loggers>
  ...
  <Logger name="org.apache.zookeeper" level="warn" additivity="false">
    <AppenderRef ref="file"/>
  </Logger>
  ...
</Loggers>
Neo
  • 4,640
  • 5
  • 39
  • 53
0

Your log level is DEBUG, that indeed is quite verbose and not meant to be used in production systems. I would increase the log level to WARN or even ERROR in the log4j.properties file (conf director). See here for a more complete explanation:

Why does zookeeper not use my log4j.properties file log directory

Community
  • 1
  • 1
eribeiro
  • 572
  • 3
  • 7