showuon commented on code in PR #17373: URL: https://github.com/apache/kafka/pull/17373#discussion_r1843386874
########## bin/connect-distributed.sh: ########## @@ -22,8 +22,15 @@ fi base_dir=$(dirname $0) -if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then +if [ -f "$base_dir/../config/connect-log4j.properties" ]; then + echo DEPRECATED: Using Log4j 1.x configuration file \$KAFKA_HOME/config/connect-log4j.properties >&2 + echo To use a Log4j 2.x configuration, create a \$KAFKA_HOME/config/log4j2.xml file and remove the Log4j 1.x configration. >&2 + echo See https://logging.apache.org/log4j/2.x/migrate-from-log4j1.html#Log4j2ConfigurationFormat for details about Log4j configuration file migration. >&2 export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/connect-log4j.properties" +elif [ -f "$base_dir/../config/connect-log4j2.properties" ]; then + export KAFKA_LOG4J_OPTS="-Dlog4j2.configurationFile=$base_dir/../config/connect-log4j2.properties" +elif [ -f "$base_dir/../config/connect-log4j2.xml" ]; then + export KAFKA_LOG4J_OPTS="-Dlog4j2.configurationFile=$base_dir/../config/connect-log4j2.xml" Review Comment: nit: I thought we'll honor log4j2.properties when both log4j2.properties and log4j.properties exist. No? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
