This is an automated email from the ASF dual-hosted git repository.
manikumar pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.0 by this push:
new 56743b37f6b MINOR: Supress stdout when checking Log4j 1.x
configuration compatibility mode (#19502)
56743b37f6b is described below
commit 56743b37f6bffb0386b08d8f4fdc5a2cd30f0140
Author: Manikumar Reddy <[email protected]>
AuthorDate: Thu Apr 17 14:29:21 2025 +0530
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.
---
bin/kafka-run-class.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
index 8bd1b17623b..3463389d3c0 100755
--- a/bin/kafka-run-class.sh
+++ b/bin/kafka-run-class.sh
@@ -225,7 +225,7 @@ if [ -z "$KAFKA_LOG4J_OPTS" ]; then
(( WINDOWS_OS_FORMAT )) && LOG4J_DIR=$(cygpath --path --mixed "${LOG4J_DIR}")
KAFKA_LOG4J_OPTS="-Dlog4j2.configurationFile=${LOG4J_DIR}"
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
export LOG4J_COMPATIBILITY=true
echo DEPRECATED: A Log4j 1.x configuration file has been detected, which
is no longer recommended. >&2