MINOR: Supress stdout when checking Log4j 1.x configuration compatibility mode (#19502)

when using log41 config, we are printing addtional line like below. This
PR is to fix that.
This commit is contained in:
Manikumar Reddy 2025-04-17 14:29:21 +05:30 committed by GitHub
parent 5f80de3923
commit bb7d8eb2c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ if [ -z "$KAFKA_LOG4J_OPTS" ]; then
(( WINDOWS_OS_FORMAT )) && LOG4J_DIR=$(cygpath --path --mixed "${LOG4J_DIR}") (( WINDOWS_OS_FORMAT )) && LOG4J_DIR=$(cygpath --path --mixed "${LOG4J_DIR}")
KAFKA_LOG4J_OPTS="-Dlog4j2.configurationFile=${LOG4J_DIR}" KAFKA_LOG4J_OPTS="-Dlog4j2.configurationFile=${LOG4J_DIR}"
else else
if echo "$KAFKA_LOG4J_OPTS" | grep -E "log4j\.[^[:space:]]+(\.properties|\.xml)$"; then if echo "$KAFKA_LOG4J_OPTS" | grep -E "log4j\.[^[:space:]]+(\.properties|\.xml)$" >/dev/null; then
# Enable Log4j 1.x configuration compatibility mode for Log4j 2 # Enable Log4j 1.x configuration compatibility mode for Log4j 2
export LOG4J_COMPATIBILITY=true export LOG4J_COMPATIBILITY=true
echo DEPRECATED: A Log4j 1.x configuration file has been detected, which is no longer recommended. >&2 echo DEPRECATED: A Log4j 1.x configuration file has been detected, which is no longer recommended. >&2