HBASE-25716 The configured loggers in log4j2.xml will always be created (#3111)

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Duo Zhang 2021-04-09 11:48:15 +08:00 committed by GitHub
parent ad06aa2082
commit 8e08952499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 14 deletions

View File

@ -27,7 +27,8 @@
<!-- Daily Rolling File Appender -->
<RollingFile name="DRFA"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<TimeBasedTriggeringPolicy interval="1" />
@ -37,7 +38,8 @@
<!-- Rolling File Appender -->
<RollingFile name="RFA"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="256MB" />
@ -47,7 +49,8 @@
<!-- Security audit appender -->
<RollingFile name="RFAS"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="256MB" />
@ -58,7 +61,8 @@
Http Access Log RFA, uncomment this if you want an http access.log
<RollingFile name="AccessRFA"
fileName="/var/log/hbase/access.log"
filePattern="/var/log/hbase/access.log.%i">
filePattern="/var/log/hbase/access.log.%i"
createOnDemand="true">
<PatternLayout pattern="%m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="200MB" />

View File

@ -27,7 +27,8 @@
<!-- Daily Rolling File Appender -->
<RollingFile name="DRFA"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<TimeBasedTriggeringPolicy interval="1" />
@ -37,7 +38,8 @@
<!-- Rolling File Appender -->
<RollingFile name="RFA"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="256MB" />
@ -47,23 +49,27 @@
<!-- Security audit appender -->
<RollingFile name="RFAS"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="256MB" />
</Policies>
<DefaultRolloverStrategy max="20" />
</RollingFile>
<!-- Http Access Log RFA -->
<!--
Http Access Log RFA, uncomment this if you want an http access.log
<RollingFile name="AccessRFA"
fileName="/var/log/hbase/access.log"
filePattern="/var/log/hbase/access.log.%i">
filePattern="/var/log/hbase/access.log.%i"
createOnDemand="true">
<PatternLayout pattern="%m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="200MB" />
</Policies>
<DefaultRolloverStrategy max="10" />
</RollingFile>
-->
<Null name="NullAppender" />
</Appenders>
<Loggers>

View File

@ -27,7 +27,8 @@
<!-- Daily Rolling File Appender -->
<RollingFile name="DRFA"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<TimeBasedTriggeringPolicy interval="1" />
@ -37,7 +38,8 @@
<!-- Rolling File Appender -->
<RollingFile name="RFA"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="256MB" />
@ -47,23 +49,27 @@
<!-- Security audit appender -->
<RollingFile name="RFAS"
fileName="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}"
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i">
filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i"
createOnDemand="true">
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="256MB" />
</Policies>
<DefaultRolloverStrategy max="20" />
</RollingFile>
<!-- Http Access Log RFA -->
<!--
Http Access Log RFA, uncomment this if you want an http access.log
<RollingFile name="AccessRFA"
fileName="/var/log/hbase/access.log"
filePattern="/var/log/hbase/access.log.%i">
filePattern="/var/log/hbase/access.log.%i"
createOnDemand="true">
<PatternLayout pattern="%m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="200MB" />
</Policies>
<DefaultRolloverStrategy max="10" />
</RollingFile>
-->
<Null name="NullAppender" />
</Appenders>
<Loggers>