chia7712 commented on code in PR #18290:
URL: https://github.com/apache/kafka/pull/18290#discussion_r1898896277


##########
bin/kafka-run-class.sh:
##########
@@ -225,6 +225,18 @@ if [ -z "$KAFKA_LOG4J_OPTS" ]; then
   (( WINDOWS_OS_FORMAT )) && LOG4J_DIR=$(cygpath --path --mixed "${LOG4J_DIR}")
   KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:${LOG4J_DIR}"
 else
+  if echo "$KAFKA_LOG4J_OPTS" | grep -qE "log4j\.[^[:space:]]+$"; then
+      # Extract Log4j 1.x configuration file path from KAFKA_LOG4J_OPTS
+      LOG4J1_CONFIG=$(echo "$KAFKA_LOG4J_OPTS" | grep -o 
'log4j\.configuration=\S*' | cut -d'=' -f2)
+
+      # Enable Log4j 1.x configuration compatibility mode for Log4j 2
+      export LOG4J_COMPATIBILITY=true

Review Comment:
   @frankvicky could you please test the compatibility on your local?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to