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 2021/03/21 15:03:30 UTC

[hbase] 01/01: HBASE-25689 Nightly client integration test is failing after upgrading to log4j2

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

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

commit d739bd6c1e998321bae46422b3dc5da6c0ef7e3d
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Sun Mar 21 23:02:37 2021 +0800

    HBASE-25689 Nightly client integration test is failing after upgrading to log4j2
---
 .../hbase_nightly_pseudo-distributed-test.sh       | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/dev-support/hbase_nightly_pseudo-distributed-test.sh b/dev-support/hbase_nightly_pseudo-distributed-test.sh
index cc46336..33b7b52 100755
--- a/dev-support/hbase_nightly_pseudo-distributed-test.sh
+++ b/dev-support/hbase_nightly_pseudo-distributed-test.sh
@@ -198,23 +198,23 @@ 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.xml" ]; then
+  cp "${component_install}/conf/log4j2.xml" "${working_dir}/hbase-conf/log4j2.xml"
 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.xml" <<EOF
+<Configuration>
+  <Appenders>
+    <!-- Console appender -->
+    <Console name="console" target="SYSTEM_ERR">
+      <PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Root level="${sys:hbase.root.logger.level:-info}">
+      <AppenderRef ref="${sys:hbase.root.logger.appender:-console}" />
+    </Root>
+  </Loggers>
+</Configuration>
 EOF
 fi