This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new a52aedd6ff9 KAFKA-18388 test-kraft-server-start.sh should use
log4j2.yaml (#18370)
a52aedd6ff9 is described below
commit a52aedd6ff9ade0230c0f41b473e8fbdfa2e0345
Author: PoAn Yang <[email protected]>
AuthorDate: Tue Jan 7 04:20:06 2025 +0800
KAFKA-18388 test-kraft-server-start.sh should use log4j2.yaml (#18370)
Reviewers: TengYao Chi <[email protected]>, Chia-Ping Tsai
<[email protected]>
---
raft/bin/test-kraft-server-start.sh | 5 ++---
raft/config/kraft-log4j.properties | 24 ------------------------
2 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/raft/bin/test-kraft-server-start.sh
b/raft/bin/test-kraft-server-start.sh
index ad7d755752f..7c62e0c91b6 100755
--- a/raft/bin/test-kraft-server-start.sh
+++ b/raft/bin/test-kraft-server-start.sh
@@ -16,9 +16,8 @@
base_dir=$(dirname $0)
-if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
- echo "DEPRECATED: using log4j 1.x configuration. To use log4j 2.x
configuration, run with: 'export
KAFKA_LOG4J_OPTS=\"-Dlog4j.configurationFile=file:$base_dir/../config/kraft-log4j2.yml\"'"
- export
KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/kraft-log4j.properties"
+if [ -z "$KAFKA_LOG4J_OPTS" ]; then
+ export
KAFKA_LOG4J_OPTS="-Dlog4j2.configurationFile=file:$base_dir/../config/kraft-log4j2.yaml"
fi
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
diff --git a/raft/config/kraft-log4j.properties
b/raft/config/kraft-log4j.properties
deleted file mode 100644
index 14f739af05d..00000000000
--- a/raft/config/kraft-log4j.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-log4j.rootLogger=INFO, stderr
-
-log4j.appender.stderr=org.apache.log4j.ConsoleAppender
-log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
-log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n
-log4j.appender.stderr.Target=System.err
-
-log4j.logger.org.apache.kafka.raft=INFO
-log4j.logger.org.apache.kafka.snapshot=INFO