I have installed ZooKeeper. ZooKeeper by default uses Apache's log4j. I need the ZooKeeper logs to go to rsyslog. But I do not know how to do this. How do I configure ZooKeeper to use rsyslog?

1 Answer 1


You need to configure log4j of zookeeper respectively. This can be done in /etc/zookeeper/conf/log4j.properties. Note that you are then interfering with the installed defaults. I don't know yet how to configure this in such a way that it survives an upgrade properly.

Change the rootLogger


and add


The SyslogAppender uses default port 514, which cannot be changed, and UDP, which cannot be changed either. So make sure in your rsyslog.conf that you have uncommented the lines

$ModLoad imudp
$UDPServerRun 514

Check SyslogAppender to find out more parameters to set, like facility.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .