Skip to content

Commit

Permalink
HBASE-26870 Log4j2 integration is incorrect in nighly's client integr…
Browse files Browse the repository at this point in the history
…ation test (apache#4251)

Signed-off-by: Sean Busbey <[email protected]>
  • Loading branch information
Apache9 authored Mar 21, 2022
1 parent 53a7ca7 commit 0d7638d
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions dev-support/hbase_nightly_pseudo-distributed-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/log4j2.xml" ]; then
cp "${component_install}/conf/log4j2.xml" "${working_dir}/hbase-conf/log4j2.xml"
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/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>
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

Expand Down

0 comments on commit 0d7638d

Please sign in to comment.