From 8e0895249904e08878080f1b94517e0fa4c51cb8 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Fri, 9 Apr 2021 11:48:15 +0800 Subject: [PATCH] HBASE-25716 The configured loggers in log4j2.xml will always be created (#3111) Signed-off-by: Michael Stack --- conf/log4j2.xml | 12 ++++++++---- .../src/main/resources/log4j2.xml | 16 +++++++++++----- .../src/main/resources/log4j2.xml | 16 +++++++++++----- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/conf/log4j2.xml b/conf/log4j2.xml index bec37e6da0e..868e0d14ffa 100644 --- a/conf/log4j2.xml +++ b/conf/log4j2.xml @@ -27,7 +27,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}" + createOnDemand="true"> @@ -37,7 +38,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i" + createOnDemand="true"> @@ -47,7 +49,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i" + createOnDemand="true"> @@ -58,7 +61,8 @@ Http Access Log RFA, uncomment this if you want an http access.log + filePattern="/var/log/hbase/access.log.%i" + createOnDemand="true"> diff --git a/hbase-archetypes/hbase-client-project/src/main/resources/log4j2.xml b/hbase-archetypes/hbase-client-project/src/main/resources/log4j2.xml index 63dbeba3cc7..868e0d14ffa 100644 --- a/hbase-archetypes/hbase-client-project/src/main/resources/log4j2.xml +++ b/hbase-archetypes/hbase-client-project/src/main/resources/log4j2.xml @@ -27,7 +27,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}" + createOnDemand="true"> @@ -37,7 +38,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i" + createOnDemand="true"> @@ -47,23 +49,27 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i" + createOnDemand="true"> - + diff --git a/hbase-archetypes/hbase-shaded-client-project/src/main/resources/log4j2.xml b/hbase-archetypes/hbase-shaded-client-project/src/main/resources/log4j2.xml index 63dbeba3cc7..868e0d14ffa 100644 --- a/hbase-archetypes/hbase-shaded-client-project/src/main/resources/log4j2.xml +++ b/hbase-archetypes/hbase-shaded-client-project/src/main/resources/log4j2.xml @@ -27,7 +27,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}" + createOnDemand="true"> @@ -37,7 +38,8 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i" + createOnDemand="true"> @@ -47,23 +49,27 @@ + filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i" + createOnDemand="true"> - +