log.threshold={{ hadoop_log_level }}
{% if hadoop_send_to_logstash %}
main.logger={{ hadoop_logstash_appender }}
{% else %}
main.logger={{ hadoop_log_appender }}
{% endif %}

zookeeper.root.logger=${log.threshold},${main.logger}
log4j.rootLogger=${zookeeper.root.logger}
log.dir=/var/log/zookeeper
log.file=zookeeper.log
log4j.appender.RFA=org.apache.log4j.RollingFileAppender
log4j.appender.RFA.File=${log.dir}/${log.file}
log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
log4j.appender.RFA.MaxFileSize=50MB
log4j.appender.RFA.MaxBackupIndex=10
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.target=System.err
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n

{% if hadoop_send_to_logstash %}
log4j.appender.LOGSTASH=org.apache.log4j.net.SocketAppender
log4j.appender.LOGSTASH.remoteHost={{ hadoop_logstash_collector_host }}
log4j.appender.LOGSTASH.port={{ hadoop_logstash_collector_socketappender_port }}
log4j.appender.LOGSTASH.ReconnectionDelay={{ hadoop_logstash_collector_socketappender_reconndelay }}
log4j.appender.LOGSTASH.LocationInfo=true
log4j.appender.LOGSTASH.layout = org.apache.log4j.PatternLayout
log4j.appender.LOGSTASH.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
{% endif %}
