You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/03/20 13:32:50 UTC

[hbase] 01/02: HBASE-26870 Log4j2 integration is incorrect in nighly's client integration test

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch HBASE-26870-branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 04dd2383f2e216b9eecff3675612e9c5013729ac
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Sun Mar 20 21:31:04 2022 +0800

    HBASE-26870 Log4j2 integration is incorrect in nighly's client integration test
---
 .../hbase_nightly_pseudo-distributed-test.sh       | 30 ++++++++++------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/dev-support/hbase_nightly_pseudo-distributed-test.sh b/dev-support/hbase_nightly_pseudo-distributed-test.sh
index 4ad431c..bf50512 100755
--- a/dev-support/hbase_nightly_pseudo-distributed-test.sh
+++ b/dev-support/hbase_nightly_pseudo-distributed-test.sh
@@ -198,23 +198,21 @@ echo "Writing out configuration for HBase."
 rm -rf "${working_dir}/hbase-conf"
 mkdir "${working_dir}/hbase-conf"
 
-if [ -f "${component_install}/conf/log4j.properties" ]; then
-  cp "${component_install}/conf/log4j.properties" "${working_dir}/hbase-conf/log4j.properties"
+if [ -f "${component_install}/conf/log4j2.properties" ]; then
+  cp "${component_install}/conf/log4j2.properties" "${working_dir}/hbase-conf/log4j2.properties"
 else
-  cat >"${working_dir}/hbase-conf/log4j.properties" <<EOF
-# Define some default values that can be overridden by system properties
-hbase.root.logger=INFO,console
-
-# Define the root logger to the system property "hbase.root.logger".
-log4j.rootLogger=${hbase.root.logger}
-
-# Logging Threshold
-log4j.threshold=ALL
-# console
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.target=System.err
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
+  cat >"${working_dir}/hbase-conf/log4j2.properties" <<EOF
+status = debug
+dest = err
+name = PropertiesConfig
+
+appender.console.type = Console
+appender.console.target = SYSTEM_ERR
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
+
+rootLogger = ${sys:hbase.root.logger:-INFO,console}
 EOF
 fi