Skip to content

Commit bb7d8eb

Browse files
authored
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.
1 parent 5f80de3 commit bb7d8eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: bin/kafka-run-class.sh

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

0 commit comments

Comments
 (0)