[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525156#comment-17525156
 ] 

Aman Jain commented on ZOOKEEPER-4524:
--------------------------------------

Thanks for the response.

Next time onwards I will be asking over mailing list. 

As you mentioned, 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 to 

ZOO_CONF_DIR=/conf

ZOO_LOG_DIR=/logs

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

logback.xml
{code:java}
<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>{code}
 

 

> Getting too many debug logs in zookeeper 3.8.0. How to change log level?
> ------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-4524
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4524
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Aman Jain
>            Priority: Major
>
> 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.
> {code:java}
> // 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 {code}
> How to change the log level in 3.8.0 zookeepe?



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to