查看zookeeper日志正确姿势

 zookeeper的日志不能直接通过vim或cat命令查看,需要通过特殊的jar包进行解析。

1.先将jar包拷贝下来

[root@node141 version-2]# java -cp /opt/soft/zookeeper/lib/slf4j-log4j12-1.7.25.jar./ 

2.通过命令解析日志即可查看

[root@node141 version-2]# java org.apache.zookeeper.server.LogFormatter /opt/soft/zookeeper/data/version-2/log.100000001
Error: Could not find or load main class org.apache.zookeeper.server.LogFormatter

你可能感兴趣的:(zookeeper学习,zookeeper,分布式,云原生)