Skip to content

Commit afd10a6

Browse files
committed
HBASE-26870 Log4j2 integration is incorrect in nighly's client integration test (#4250)
Signed-off-by: Sean Busbey <[email protected]> (cherry picked from commit 8640453)
1 parent c2ab765 commit afd10a6

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

dev-support/hbase_nightly_pseudo-distributed-test.sh

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,23 +198,21 @@ echo "Writing out configuration for HBase."
198198
rm -rf "${working_dir}/hbase-conf"
199199
mkdir "${working_dir}/hbase-conf"
200200

201-
if [ -f "${component_install}/conf/log4j.properties" ]; then
202-
cp "${component_install}/conf/log4j.properties" "${working_dir}/hbase-conf/log4j.properties"
201+
if [ -f "${component_install}/conf/log4j2.properties" ]; then
202+
cp "${component_install}/conf/log4j2.properties" "${working_dir}/hbase-conf/log4j2.properties"
203203
else
204-
cat >"${working_dir}/hbase-conf/log4j.properties" <<EOF
205-
# Define some default values that can be overridden by system properties
206-
hbase.root.logger=INFO,console
207-
208-
# Define the root logger to the system property "hbase.root.logger".
209-
log4j.rootLogger=${hbase.root.logger}
210-
211-
# Logging Threshold
212-
log4j.threshold=ALL
213-
# console
214-
log4j.appender.console=org.apache.log4j.ConsoleAppender
215-
log4j.appender.console.target=System.err
216-
log4j.appender.console.layout=org.apache.log4j.PatternLayout
217-
log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
204+
cat >"${working_dir}/hbase-conf/log4j2.properties" <<EOF
205+
status = debug
206+
dest = err
207+
name = PropertiesConfig
208+
209+
appender.console.type = Console
210+
appender.console.target = SYSTEM_ERR
211+
appender.console.name = Console
212+
appender.console.layout.type = PatternLayout
213+
appender.console.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
214+
215+
rootLogger = ${sys:hbase.root.logger:-INFO,console}
218216
EOF
219217
fi
220218

0 commit comments

Comments
 (0)