Hi Aman,

I did the following:

1. Downloaded apache-zookeeper-3.8.0-bin.tar.gz, verified sig, unpacked
2. Copied the sample config: cp conf/zoo_sample.cfg conf/zoo.cfg
3. Started the server: bin/zkServer.sh start-foreground

I didn’t see any DEBUG logs on the screen. The default logback.xml that we ship 
with ZooKeeper is in the conf directory.

Andor





> On 2022. Apr 22., at 8:51, Aman Jain <[email protected]> wrote:
> 
> 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>
> 
> 
> 
> 
> --
> Regards,
> Aman
> 

Reply via email to