Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2407

Only create a log directory when it will be used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.2.1
    • 0.9.0.0
    • 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.

      Attachments

        Activity

          People

            granthenke Grant Henke
            granthenke Grant Henke
            Gwen Shapira Gwen Shapira
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: