Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how do I configure log4j.properties for zookeeper?

avatar
Expert Contributor

Hi,

I have HDP 2.4.0 with Ambari 2.2.1.

I tried to modify log4j.properti by advancec-zookeeper-log4j but when you restart of zookeeper, the server has not acquired the changes.

I saw that in the file zkEnv.sh

if [ "x${ZOO_LOG4J_PROP}" = "x" ]
then
    ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
fi

I tried to set DEBUG but has not changed the logging level

3 REPLIES 3

avatar

Can you try to change that via Ambari Zookeeper config?

Ambari will overwrite everything in the config files that you change directly on the filesystem

avatar
Expert Contributor

Hi @Bernhard Walter,

I tried to change log4j properties of zookeeper from ambari, but the server has not acquired the changes.

avatar
Expert Contributor

Ok, in advaced zookeeper.log4j set:

log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/zookeeper.log

${zookeeper.log.dir} is missing in defaul configuration.