By default Kafka writes its server logs into a "logs" directory underneath the installation root. I'm trying to override this to get it to write logs to an external location so that I can separate all the read/write logs/data from the read-only binaries. But I can't get it to work correctly.
I've set the following in my startup script to try to get it to log to /data/kafka/log: export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:/etc/kafka/log4j.properties -Dkafka.logs.dir=/data/kafka/log" In /etc/kafka/log4j.properties I've also set kafka.logs.dir to the same location as specified above. If I only specify it in the properties file and not via KAFKA_LOG4J_OPTS, it doesn't work (all of the logs keep going to the default location). And this works... sort of. It sends all logs where I want *except* for kafkaServer-gc.log and kafkaServer.out, both of which still go to "logs" under the installation root. Am I missing something? Or can I simply not redirect these two files so that ALL my logs go somewhere outside the installation location? Thanks.