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

Kafka Connect: Allow environment variable to set output directory of Kafka Connect logs

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Abandoned
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: KafkaConnect
    • Labels:
      None

      Description

      Currently in Kafka Connect I believe that if you want to change what file logs are written to you need to include a new log4j .properties file and then override the KAFKA_LOG4J_OPTS environment variable. This can be seen here https://github.com/apache/kafka/blob/trunk/bin/connect-distributed.sh I believe there is a valid use case for allowing a separate environment variable such as CONNECT_LOG4J_DIR or similar to allow a user simply to chose where the logs are written. This makes sense to me in a case where the default .properties file works great but we simply want to change the output location.  An example could be if we are deploying to Kubernetes or similar and want to write logs to a persistent volume. With an environment variable dedicated to this use it saves busy work and extra steps while providing the desired functionality succinctly. In the case when the variable is not set we simply revert to the default settings. I do not believe I am alone on wanting this use case as I have come across several other Stack Overflow and similar posts. 

       

      I believe this change would be pretty simple to implement and I would like to take a shot at it if this seems legitimate, would love some feedback

       

      Best,

      Brandon

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bmoe24x Brandon Moe
              Reviewer:
              Brandon Moe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified