I am running 3.8.0 version of Zookeeper that uses logback.
Getting too many debug logs, In 7 hours it logged more than 300M worth of logs.
// ffe zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:38:58.325 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:38:58.325 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:38:58.325 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:38:59.659 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:38:59.659 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:38:59.659 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:38:59.869 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0024
11:38:59.869 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0024 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:38:59.869 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0024 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:39:00.993 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:39:00.993 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:39:00.993 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:39:02.327 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:39:02.327 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:39:02.327 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:39:03.661 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:39:03.661 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:39:03.661 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:39:04.995 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:39:04.995 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:39:04.995 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:39:05.874 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0024
11:39:05.874 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0024 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:39:05.874 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0024 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
11:39:06.329 [ProcessThread(sid:0 cport:2181):] DEBUG 
org.apache.zookeeper.server.SessionTrackerImpl - Checking session 
0x1020a4e931f0035
11:39:06.329 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - Processing request:: 
sessionid:0x1020a4e931f0035 type:ping cxid:0xfffffffffffffffe 
zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a
11:39:06.329 [SyncThread:0] DEBUG 
org.apache.zookeeper.server.FinalRequestProcessor - sessionid:0x1020a4e931f0035 
type:ping cxid:0xfffffffffffffffe zxid:0xfffffffffffffffe txntype:unknown 
reqpath:n/a
How to change the log level in 3.8.0 zookeeper?



I want to change some settings in the logback.xml. But I couldn't find a 
default configuration and path of logback.xml inside the tar of 
apache-zookeeper-3.8.0-bin.

I tried adding the default logback.xml but that doesn’t worked.

ZOO_CONF_DIR=/conf

ZOO_LOG_DIR=/logs

COPY logback.xml $ZOO_CONF_DIR/
COPY logback.xml $ZOO_LOG_DIR/

logback.xml

<configuration>



    <property name="zookeeper.console.threshold" value="INFO" />



    <property name="zookeeper.log.dir" value="." />

    <property name="zookeeper.log.file" value="zookeeper.log" />

    <property name="zookeeper.log.threshold" value="INFO" />

    <property name="zookeeper.log.maxfilesize" value="256MB" />

    <property name="zookeeper.log.maxbackupindex" value="20" />



    <!--

      console

      Add "console" to root logger if you want to use this

    -->

    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">

        <encoder>

            <pattern>%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - 
%m%n</pattern>

        </encoder>

        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">

            <level>${zookeeper.console.threshold}</level>

        </filter>

    </appender>



    <root level="INFO">

        <appender-ref ref="CONSOLE" />

    </root>

</configuration>



Reply via email to