Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8.2.1
-
None
-
None
Description
Currently kafka-run-class.sh will default the $LOG_DIR and create the directory regardless of it's use. This can cause permissions issues depending on what users are utilizing tools such as kafka-topics.sh.
Further down in the script there is logic to detect whether $KAFKA_LOG4J_OPTS is set. If it is not set this is assumed to be a tool call and the script sets tools-log4j.properties which only uses the console appender. In this scenario a logging directory is not needed. In all other cases $KAFKA_LOG4J_OPTS will be set and we can move the $LOG_DIR defaulting & creation logic there. For example kafka-server-start.sh sets $KAFKA_LOG4J_OPTS to use its own log4j.properties file which respects the $LOG_DIR/kafka.log4j.dir setting.