zookeeper查看日志

  zookeeper的事务日志文件路径在配置文件中是有指定的,且事务日志中存储的都是二进制的数据,我们需要借助LogFormatter类的功能来解释该数据。

[root@develop zookeeper]# pwd
/usr/local/zookeeper
[root@develop zookeeper]# echo stat | nc localhost 2181
Zookeeper version: 3.4.13
[root@develop zookeeper]# cat conf/zoo.cfg | grep log
dataLogDir=/tmp/zookeeper/logs
[root@develop zookeeper]# java -classpath lib/slf4j-api-1.7.25.jar:dist-maven/zookeeper-3.4.13.jar org.apache.zookeeper.server.LogFormatter /tmp/zookeeper/logs/version-2/log.1


posted @ 2019-06-28 10:58  merlee  阅读(9533)  评论(0编辑  收藏  举报