under /var/log/zookeeper , we have the zookeeper logs , as the following
-rw-r--r-- 1 zookeeper hadoop 104857712 Jul 5 15:54 zookeeper-zookeeper-server-master.sys87.com.log.1
-rw-r--r-- 1 zookeeper hadoop 177 Jul 16 11:57 zookeeper-zookeeper-server-master.sys87.com.out
-rw-r--r-- 1 zookeeper hadoop 66358998 Jul 16 23:15 zookeeper-zookeeper-server-master.sys87.com.log
the problem is that we get only the INFO severity from the logs!
and when we set the TRCE severity , and restart the zookeeper service , then its not change the zookeeper log content to trace mode,
can we get example of log4j for zookeeper ?
we suspect that our log4j isn't configured properly
@Michael BronsonInside the
Ambari UI --> Zookeerper --> Configs --> Advanced --> "Advanced zookeeper-log4j" you will find the zookeeper-log4j template.
Inside the template try this:
Change-1). Change the rootLogger line and enable 'TRACEFILE' appender
Comment the line:
#log4j.rootLogger=INFO, CONSOLE, ROLLINGFILE
And then uncomment the following line:
log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
Change-2). Now inside the same template alter the line:
Now restart Zookeeper.
Then check the log "zookeeper_trace.log"
# tail -f /var/log/zookeeper/zookeeper_trace.log
View solution in original post
DEBUG/TRACE logging consumes much disk space. Hence it is better to disable them once you have collected enough race/debug logs for your troubleshooting purpose..