При попытке установить уровень журнала zookeeper равным значению, которое устанавливается из переменной среды, ошибка содержит следующее сообщение:
2018-10-17T00:45:32.658628+00:00 cherry-zk-node zookeeper: log4j:ERROR Could not find value for key log4j.appender.TRACE
2018-10-17T00:45:32.658902+00:00 cherry-zk-node zookeeper: log4j:ERROR Could not instantiate appender named "TRACE".
2018-10-17T12:45:32.692874+00:00 cherry-zk-node zookeeper: log4j:ERROR Could not find value for key log4j.appender.TRACEFILE
2018-10-17T00:45:32.693154+00:00 cherry-zk-node zookeeper: log4j:ERROR Could not instantiate appender named "TRACEFILE".
Ниже приведен файл log4j.properties
zookeeper.root.logger=$ENV_VARIABLE
zookeeper.console.threshold=$ENV_VARIABLE
zookeeper.log.file=zk.log
zookeeper.log.threshold=$ENV_VARIABLE
zookeeper.log.dir=.
log4j.rootLogger=${zookeeper.root.logger}
# CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
# Set Appenders for ALL log levels from ENV variable
log4j.appender.WARN.Threshold=${zookeeper.console.threshold}
log4j.appender.INFO.Threshold=${zookeeper.console.threshold}
log4j.appender.ERROR.Threshold=${zookeeper.console.threshold}
log4j.appender.TRACE.Threshold=${zookeeper.console.threshold}
# Max log file size of 25MB
log4j.appender.ROLLINGFILE.MaxFileSize=25MB