HBASE-26723 Switch to use log4j2.properties file to configure log4j2 (#4096)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
parent
f6b74b3083
commit
4bea1e8c37
17
bin/hbase
17
bin/hbase
|
@ -751,8 +751,8 @@ elif [ "$COMMAND" = "hbtop" ] ; then
|
|||
done
|
||||
fi
|
||||
|
||||
if [ -f "${HBASE_HOME}/conf/log4j-hbtop.properties" ] ; then
|
||||
HBASE_HBTOP_OPTS="${HBASE_HBTOP_OPTS} -Dlog4j.configuration=file:${HBASE_HOME}/conf/log4j-hbtop.properties"
|
||||
if [ -f "${HBASE_HOME}/conf/log4j2-hbtop.properties" ] ; then
|
||||
HBASE_HBTOP_OPTS="${HBASE_HBTOP_OPTS} -Dlog4j2.configurationFile=file:${HBASE_HOME}/conf/log4j2-hbtop.properties"
|
||||
fi
|
||||
HBASE_OPTS="${HBASE_OPTS} ${HBASE_HBTOP_OPTS}"
|
||||
else
|
||||
|
@ -826,11 +826,7 @@ HBASE_OPTS="$HBASE_OPTS -Dhbase.log.dir=$HBASE_LOG_DIR"
|
|||
HBASE_OPTS="$HBASE_OPTS -Dhbase.log.file=$HBASE_LOGFILE"
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.home.dir=$HBASE_HOME"
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.id.str=$HBASE_IDENT_STRING"
|
||||
# log4j2 does not support setting log level and appender at once, so we need to split HBASE_ROOT_LOGGER
|
||||
HBASE_ROOT_LOGGER=${HBASE_ROOT_LOGGER:-INFO,console}
|
||||
array=(${HBASE_ROOT_LOGGER//,/ })
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.root.logger.level=${array[0]}"
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.root.logger.appender=${array[1]}"
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.root.logger=${HBASE_ROOT_LOGGER:-INFO,console}"
|
||||
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
|
||||
HBASE_OPTS="$HBASE_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JAVA_LIBRARY_PATH"
|
||||
|
@ -838,13 +834,10 @@ fi
|
|||
|
||||
# Enable security logging on the master and regionserver only
|
||||
if [ "$COMMAND" = "master" ] || [ "$COMMAND" = "regionserver" ]; then
|
||||
HBASE_SECURITY_LOGGER=${HBASE_SECURITY_LOGGER:-INFO,RFAS}
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.security.logger=${HBASE_SECURITY_LOGGER:-INFO,RFAS}"
|
||||
else
|
||||
HBASE_SECURITY_LOGGER=${HBASE_SECURITY_LOGGER:-INFO,NullAppender}
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.security.logger=${HBASE_SECURITY_LOGGER:-INFO,NullAppender}"
|
||||
fi
|
||||
array=(${HBASE_SECURITY_LOGGER//,/ })
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.security.logger.level=${array[0]}"
|
||||
HBASE_OPTS="$HBASE_OPTS -Dhbase.security.logger.appender=${array[1]}"
|
||||
|
||||
HEAP_SETTINGS="$JAVA_HEAP_MAX $JAVA_OFFHEAP_MAX"
|
||||
# by now if we're running a command it means we need logging
|
||||
|
|
|
@ -332,13 +332,7 @@ set HBASE_OPTS=%HBASE_OPTS% -Djava.util.logging.config.class="org.apache.hadoop.
|
|||
if not defined HBASE_ROOT_LOGGER (
|
||||
set HBASE_ROOT_LOGGER=INFO,console
|
||||
)
|
||||
|
||||
for /F "tokens=1,2 delims=," %%a in ("%HBASE_ROOT_LOGGER%") do (
|
||||
set HBASE_ROOT_LOGGER_LEVEL=%%a
|
||||
set HBASE_ROOT_LOGGER_APPENDER=%%b
|
||||
)
|
||||
|
||||
set HBASE_OPTS=%HBASE_OPTS% -Dhbase.root.logger.level="%HBASE_ROOT_LOGGER_LEVEL% -Dhbase.root.logger.appender="%HBASE_ROOT_LOGGER_APPENDER% "
|
||||
set HBASE_OPTS=%HBASE_OPTS% -Dhbase.root.logger="%HBASE_ROOT_LOGGER%"
|
||||
|
||||
if defined JAVA_LIBRARY_PATH (
|
||||
set HBASE_OPTS=%HBASE_OPTS% -Djava.library.path="%JAVA_LIBRARY_PATH%"
|
||||
|
@ -354,13 +348,7 @@ if not defined HBASE_SECURITY_LOGGER (
|
|||
set HBASE_SECURITY_LOGGER=INFO,DRFAS
|
||||
)
|
||||
)
|
||||
|
||||
for /F "tokens=1,2 delims=," %%a in ("%HBASE_SECURITY_LOGGER%") do (
|
||||
set HBASE_SECURITY_LOGGER_LEVEL=%%a
|
||||
set HBASE_SECURITY_LOGGER_APPENDER=%%b
|
||||
)
|
||||
|
||||
set HBASE_OPTS=%HBASE_OPTS% -Dhbase.security.logger.level="%HBASE_SECURITY_LOGGER_LEVEL% -Dhbase.security.logger.appender="%HBASE_SECURITY_LOGGER_APPENDER%"
|
||||
set HBASE_OPTS=%HBASE_OPTS% -Dhbase.security.logger="%HBASE_SECURITY_LOGGER%"
|
||||
|
||||
set HEAP_SETTINGS=%JAVA_HEAP_MAX% %JAVA_OFFHEAP_MAX%
|
||||
set java_arguments=%HEAP_SETTINGS% %HBASE_OPTS% -classpath "%CLASSPATH%" %CLASS% %hbase-command-arguments%
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
@rem set HBASE_OFFHEAPSIZE=1000
|
||||
|
||||
@rem For example, to allocate 8G of offheap, to 8G:
|
||||
@rem etHBASE_OFFHEAPSIZE=8G
|
||||
@rem set HBASE_OFFHEAPSIZE=8G
|
||||
|
||||
@rem Extra Java runtime options.
|
||||
@rem Below are what we set by default. May only work with SUN JVM.
|
||||
|
@ -82,6 +82,9 @@ set HBASE_OPTS=%HBASE_OPTS% "-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stac
|
|||
@rem Tell HBase whether it should manage it's own instance of ZooKeeper or not.
|
||||
@rem set HBASE_MANAGES_ZK=true
|
||||
|
||||
@rem Tell HBase the logger level and appenders
|
||||
@rem set HBASE_ROOT_LOGGER=INFO,DRFA
|
||||
|
||||
@rem Uncomment to enable trace, you can change the options to use other exporters such as jaeger or
|
||||
@rem zipkin. See https://github.com/open-telemetry/opentelemetry-java-instrumentation on how to
|
||||
@rem configure exporters and other components through system properties.
|
||||
|
|
|
@ -127,11 +127,11 @@
|
|||
# export HBASE_MANAGES_ZK=true
|
||||
|
||||
# The default log rolling policy is RFA, where the log file is rolled as per the size defined for the
|
||||
# RFA appender. Please refer to the log4j.properties file to see more details on this appender.
|
||||
# RFA appender. Please refer to the log4j2.properties file to see more details on this appender.
|
||||
# In case one needs to do log rolling on a date change, one should set the environment property
|
||||
# HBASE_ROOT_LOGGER to "<DESIRED_LOG LEVEL>,DRFA".
|
||||
# For example:
|
||||
# HBASE_ROOT_LOGGER=INFO,DRFA
|
||||
# export HBASE_ROOT_LOGGER=INFO,DRFA
|
||||
# The reason for changing default to RFA is to avoid the boundary case of filling out disk space as
|
||||
# DRFA doesn't put any cap on the log size. Please refer to HBase-5655 for more context.
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
#/**
|
||||
# * Licensed to the Apache Software Foundation (ASF) under one
|
||||
# * or more contributor license agreements. See the NOTICE file
|
||||
# * distributed with this work for additional information
|
||||
# * regarding copyright ownership. The ASF licenses this file
|
||||
# * to you under the Apache License, Version 2.0 (the
|
||||
# * "License"); you may not use this file except in compliance
|
||||
# * with the License. You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.apache.org/licenses/LICENSE-2.0
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# */
|
||||
|
||||
status = warn
|
||||
dest = err
|
||||
name = PropertiesConfig
|
||||
|
||||
# console
|
||||
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}: %m%n
|
||||
|
||||
rootLogger = WARN,console
|
||||
|
||||
# ZooKeeper will still put stuff at WARN
|
||||
logger.zookeeper.name = org.apache.zookeeper
|
||||
logger.zookeeper.level = ERROR
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<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="warn">
|
||||
<AppenderRef ref="console" />
|
||||
</Root>
|
||||
<!-- ZooKeeper will still put stuff at WARN -->
|
||||
<Logger name="org.apache.zookeeper" level="error" />
|
||||
</Loggers>
|
||||
</Configuration>
|
|
@ -0,0 +1,137 @@
|
|||
#/**
|
||||
# * Licensed to the Apache Software Foundation (ASF) under one
|
||||
# * or more contributor license agreements. See the NOTICE file
|
||||
# * distributed with this work for additional information
|
||||
# * regarding copyright ownership. The ASF licenses this file
|
||||
# * to you under the Apache License, Version 2.0 (the
|
||||
# * "License"); you may not use this file except in compliance
|
||||
# * with the License. You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.apache.org/licenses/LICENSE-2.0
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# */
|
||||
|
||||
status = warn
|
||||
dest = err
|
||||
name = PropertiesConfig
|
||||
|
||||
# Console appender
|
||||
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
|
||||
|
||||
# Daily Rolling File Appender
|
||||
appender.DRFA.type = RollingFile
|
||||
appender.DRFA.name = DRFA
|
||||
appender.DRFA.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}
|
||||
appender.DRFA.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}
|
||||
appender.DRFA.createOnDemand = true
|
||||
appender.DRFA.layout.type = PatternLayout
|
||||
appender.DRFA.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.DRFA.policies.type = Policies
|
||||
appender.DRFA.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.DRFA.policies.time.interval = 1
|
||||
appender.DRFA.policies.time.modulate = true
|
||||
appender.DRFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.DRFA.policies.size.size = ${sys:hbase.log.maxfilesize:-256MB}
|
||||
appender.DRFA.strategy.type = DefaultRolloverStrategy
|
||||
appender.DRFA.strategy.max = ${sys:hbase.log.maxbackupindex:-20}
|
||||
|
||||
# Rolling File Appender
|
||||
appender.RFA.type = RollingFile
|
||||
appender.RFA.name = RFA
|
||||
appender.RFA.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}
|
||||
appender.RFA.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i
|
||||
appender.RFA.createOnDemand = true
|
||||
appender.RFA.layout.type = PatternLayout
|
||||
appender.RFA.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.RFA.policies.type = Policies
|
||||
appender.RFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.RFA.policies.size.size = ${sys:hbase.log.maxfilesize:-256MB}
|
||||
appender.RFA.strategy.type = DefaultRolloverStrategy
|
||||
appender.RFA.strategy.max = ${sys:hbase.log.maxbackupindex:-20}
|
||||
|
||||
# Security Audit Appender
|
||||
appender.RFAS.type = RollingFile
|
||||
appender.RFAS.name = RFAS
|
||||
appender.RFAS.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}
|
||||
appender.RFAS.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i
|
||||
appender.RFAS.createOnDemand = true
|
||||
appender.RFAS.layout.type = PatternLayout
|
||||
appender.RFAS.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.RFAS.policies.type = Policies
|
||||
appender.RFAS.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.RFAS.policies.size.size = ${sys:hbase.security.log.maxfilesize:-256MB}
|
||||
appender.RFAS.strategy.type = DefaultRolloverStrategy
|
||||
appender.RFAS.strategy.max = ${sys:hbase.security.log.maxbackupindex:-20}
|
||||
|
||||
# Http Access Log RFA, uncomment this if you want an http access.log
|
||||
# appender.AccessRFA.type = RollingFile
|
||||
# appender.AccessRFA.name = AccessRFA
|
||||
# appender.AccessRFA.fileName = /var/log/hbase/access.log
|
||||
# appender.AccessRFA.filePattern = /var/log/hbase/access.log.%i
|
||||
# appender.AccessRFA.createOnDemand = true
|
||||
# appender.AccessRFA.layout.type = PatternLayout
|
||||
# appender.AccessRFA.layout.pattern = %m%n
|
||||
# appender.AccessRFA.policies.type = Policies
|
||||
# appender.AccessRFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
# appender.AccessRFA.policies.size.size = 200MB
|
||||
# appender.AccessRFA.strategy.type = DefaultRolloverStrategy
|
||||
# appender.AccessRFA.strategy.max = 10
|
||||
|
||||
# Null Appender
|
||||
appender.NullAppender.type = Null
|
||||
appender.NullAppender.name = NullAppender
|
||||
|
||||
rootLogger = ${sys:hbase.root.logger:-INFO,console}
|
||||
|
||||
logger.SecurityLogger.name = SecurityLogger
|
||||
logger.SecurityLogger = ${sys:hbase.security.logger:-INFO,console}
|
||||
logger.SecurityLogger.additivity = false
|
||||
|
||||
# Custom Logging levels
|
||||
# logger.zookeeper.name = org.apache.zookeeper
|
||||
# logger.zookeeper.level = ERROR
|
||||
|
||||
# logger.FSNamesystem.name = org.apache.hadoop.fs.FSNamesystem
|
||||
# logger.FSNamesystem.level = DEBUG
|
||||
|
||||
# logger.hbase.name = org.apache.hadoop.hbase
|
||||
# logger.hbase.level = DEBUG
|
||||
|
||||
# logger.META.name = org.apache.hadoop.hbase.META
|
||||
# logger.META.level = DEBUG
|
||||
|
||||
# Make these two classes below DEBUG to see more zk debug.
|
||||
# logger.ZKUtil.name = org.apache.hadoop.hbase.zookeeper.ZKUtil
|
||||
# logger.ZKUtil.level = DEBUG
|
||||
|
||||
# logger.ZKWatcher.name = org.apache.hadoop.hbase.zookeeper.ZKWatcher
|
||||
# logger.ZKWatcher.level = DEBUG
|
||||
|
||||
# logger.dfs.name = org.apache.hadoop.dfs
|
||||
# logger.dfs.level = DEBUG
|
||||
|
||||
# Prevent metrics subsystem start/stop messages (HBASE-17722)
|
||||
logger.MetricsConfig.name = org.apache.hadoop.metrics2.impl.MetricsConfig
|
||||
logger.MetricsConfig.level = WARN
|
||||
|
||||
logger.MetricsSinkAdapte.name = org.apache.hadoop.metrics2.impl.MetricsSinkAdapter
|
||||
logger.MetricsSinkAdapte.level = WARN
|
||||
|
||||
logger.MetricsSystemImpl.name = org.apache.hadoop.metrics2.impl.MetricsSystemImpl
|
||||
logger.MetricsSystemImpl.level = WARN
|
||||
|
||||
# Disable request log by default, you can enable this by changing the appender
|
||||
logger.http.name = http.requests
|
||||
logger.http.additivity = false
|
||||
logger.http = INFO,NullAppender
|
||||
# Replace the above with this configuration if you want an http access.log
|
||||
# logger.http = INFO,AccessRFA
|
109
conf/log4j2.xml
109
conf/log4j2.xml
|
@ -1,109 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<Configuration>
|
||||
<Appenders>
|
||||
<!-- Console appender -->
|
||||
<Console name="console" target="SYSTEM_ERR">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
</Console>
|
||||
<!-- 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}"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30" />
|
||||
</RollingFile>
|
||||
<!-- 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"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="256MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="20" />
|
||||
</RollingFile>
|
||||
<!-- 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"
|
||||
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, 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"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%m%n" />
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="200MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10" />
|
||||
</RollingFile>
|
||||
-->
|
||||
<Null name="NullAppender" />
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="${sys:hbase.root.logger.level:-info}">
|
||||
<AppenderRef ref="${sys:hbase.root.logger.appender:-console}" />
|
||||
</Root>
|
||||
<Logger name="SecurityLogger" level="${sys:hbase.security.logger.level:-info}"
|
||||
additivity="false">
|
||||
<AppenderRef ref="${sys:hbase.security.logger.appender:-console}" />
|
||||
</Logger>
|
||||
<!-- Custom Logging levels -->
|
||||
<!--
|
||||
<Logger name="org.apache.zookeeper" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.fs.FSNamesystem" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase.META" level="debug"/>
|
||||
Make these two classes below DEBUG to see more zk debug.
|
||||
<Logger name="org.apache.hadoop.hbase.zookeeper.ZKUtil" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase.zookeeper.ZKWatcher" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.dfs" level="debug"/>
|
||||
-->
|
||||
<!-- Prevent metrics subsystem start/stop messages (HBASE-17722) -->
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsConfig" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSinkAdapter" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSystemImpl" level="warn" />
|
||||
<!-- Disable request log by default, you can enable this by changing the appender -->
|
||||
<Logger name="http.requests" level="info" additivity="false">
|
||||
<AppenderRef ref="NullAppender" />
|
||||
</Logger>
|
||||
<!--
|
||||
Replace the above with this configuration if you want an http access.log
|
||||
<Logger name="http.requests" level="info" additivity="false">
|
||||
<AppenderRef ref="AccessRFA" />
|
||||
</Logger>
|
||||
-->
|
||||
</Loggers>
|
||||
</Configuration>
|
|
@ -0,0 +1,137 @@
|
|||
#/**
|
||||
# * Licensed to the Apache Software Foundation (ASF) under one
|
||||
# * or more contributor license agreements. See the NOTICE file
|
||||
# * distributed with this work for additional information
|
||||
# * regarding copyright ownership. The ASF licenses this file
|
||||
# * to you under the Apache License, Version 2.0 (the
|
||||
# * "License"); you may not use this file except in compliance
|
||||
# * with the License. You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.apache.org/licenses/LICENSE-2.0
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# */
|
||||
|
||||
status = warn
|
||||
dest = err
|
||||
name = PropertiesConfig
|
||||
|
||||
# Console appender
|
||||
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
|
||||
|
||||
# Daily Rolling File Appender
|
||||
appender.DRFA.type = RollingFile
|
||||
appender.DRFA.name = DRFA
|
||||
appender.DRFA.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}
|
||||
appender.DRFA.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}
|
||||
appender.DRFA.createOnDemand = true
|
||||
appender.DRFA.layout.type = PatternLayout
|
||||
appender.DRFA.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.DRFA.policies.type = Policies
|
||||
appender.DRFA.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.DRFA.policies.time.interval = 1
|
||||
appender.DRFA.policies.time.modulate = true
|
||||
appender.DRFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.DRFA.policies.size.size = ${sys:hbase.log.maxfilesize:-256MB}
|
||||
appender.DRFA.strategy.type = DefaultRolloverStrategy
|
||||
appender.DRFA.strategy.max = ${sys:hbase.log.maxbackupindex:-20}
|
||||
|
||||
# Rolling File Appender
|
||||
appender.RFA.type = RollingFile
|
||||
appender.RFA.name = RFA
|
||||
appender.RFA.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}
|
||||
appender.RFA.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i
|
||||
appender.RFA.createOnDemand = true
|
||||
appender.RFA.layout.type = PatternLayout
|
||||
appender.RFA.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.RFA.policies.type = Policies
|
||||
appender.RFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.RFA.policies.size.size = ${sys:hbase.log.maxfilesize:-256MB}
|
||||
appender.RFA.strategy.type = DefaultRolloverStrategy
|
||||
appender.RFA.strategy.max = ${sys:hbase.log.maxbackupindex:-20}
|
||||
|
||||
# Security Audit Appender
|
||||
appender.RFAS.type = RollingFile
|
||||
appender.RFAS.name = RFAS
|
||||
appender.RFAS.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}
|
||||
appender.RFAS.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i
|
||||
appender.RFAS.createOnDemand = true
|
||||
appender.RFAS.layout.type = PatternLayout
|
||||
appender.RFAS.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.RFAS.policies.type = Policies
|
||||
appender.RFAS.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.RFAS.policies.size.size = ${sys:hbase.security.log.maxfilesize:-256MB}
|
||||
appender.RFAS.strategy.type = DefaultRolloverStrategy
|
||||
appender.RFAS.strategy.max = ${sys:hbase.security.log.maxbackupindex:-20}
|
||||
|
||||
# Http Access Log RFA, uncomment this if you want an http access.log
|
||||
# appender.AccessRFA.type = RollingFile
|
||||
# appender.AccessRFA.name = AccessRFA
|
||||
# appender.AccessRFA.fileName = /var/log/hbase/access.log
|
||||
# appender.AccessRFA.filePattern = /var/log/hbase/access.log.%i
|
||||
# appender.AccessRFA.createOnDemand = true
|
||||
# appender.AccessRFA.layout.type = PatternLayout
|
||||
# appender.AccessRFA.layout.pattern = %m%n
|
||||
# appender.AccessRFA.policies.type = Policies
|
||||
# appender.AccessRFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
# appender.AccessRFA.policies.size.size = 200MB
|
||||
# appender.AccessRFA.strategy.type = DefaultRolloverStrategy
|
||||
# appender.AccessRFA.strategy.max = 10
|
||||
|
||||
# Null Appender
|
||||
appender.NullAppender.type = Null
|
||||
appender.NullAppender.name = NullAppender
|
||||
|
||||
rootLogger = ${sys:hbase.root.logger:-INFO,console}
|
||||
|
||||
logger.SecurityLogger.name = SecurityLogger
|
||||
logger.SecurityLogger = ${sys:hbase.security.logger:-INFO,console}
|
||||
logger.SecurityLogger.additivity = false
|
||||
|
||||
# Custom Logging levels
|
||||
# logger.zookeeper.name = org.apache.zookeeper
|
||||
# logger.zookeeper.level = ERROR
|
||||
|
||||
# logger.FSNamesystem.name = org.apache.hadoop.fs.FSNamesystem
|
||||
# logger.FSNamesystem.level = DEBUG
|
||||
|
||||
# logger.hbase.name = org.apache.hadoop.hbase
|
||||
# logger.hbase.level = DEBUG
|
||||
|
||||
# logger.META.name = org.apache.hadoop.hbase.META
|
||||
# logger.META.level = DEBUG
|
||||
|
||||
# Make these two classes below DEBUG to see more zk debug.
|
||||
# logger.ZKUtil.name = org.apache.hadoop.hbase.zookeeper.ZKUtil
|
||||
# logger.ZKUtil.level = DEBUG
|
||||
|
||||
# logger.ZKWatcher.name = org.apache.hadoop.hbase.zookeeper.ZKWatcher
|
||||
# logger.ZKWatcher.level = DEBUG
|
||||
|
||||
# logger.dfs.name = org.apache.hadoop.dfs
|
||||
# logger.dfs.level = DEBUG
|
||||
|
||||
# Prevent metrics subsystem start/stop messages (HBASE-17722)
|
||||
logger.MetricsConfig.name = org.apache.hadoop.metrics2.impl.MetricsConfig
|
||||
logger.MetricsConfig.level = WARN
|
||||
|
||||
logger.MetricsSinkAdapte.name = org.apache.hadoop.metrics2.impl.MetricsSinkAdapter
|
||||
logger.MetricsSinkAdapte.level = WARN
|
||||
|
||||
logger.MetricsSystemImpl.name = org.apache.hadoop.metrics2.impl.MetricsSystemImpl
|
||||
logger.MetricsSystemImpl.level = WARN
|
||||
|
||||
# Disable request log by default, you can enable this by changing the appender
|
||||
logger.http.name = http.requests
|
||||
logger.http.additivity = false
|
||||
logger.http = INFO,NullAppender
|
||||
# Replace the above with this configuration if you want an http access.log
|
||||
# logger.http = INFO,AccessRFA
|
|
@ -1,109 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<Configuration>
|
||||
<Appenders>
|
||||
<!-- Console appender -->
|
||||
<Console name="console" target="SYSTEM_ERR">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
</Console>
|
||||
<!-- 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}"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30" />
|
||||
</RollingFile>
|
||||
<!-- 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"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="256MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="20" />
|
||||
</RollingFile>
|
||||
<!-- 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"
|
||||
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, 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"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%m%n" />
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="200MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10" />
|
||||
</RollingFile>
|
||||
-->
|
||||
<Null name="NullAppender" />
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="${sys:hbase.root.logger.level:-info}">
|
||||
<AppenderRef ref="${sys:hbase.root.logger.appender:-console}" />
|
||||
</Root>
|
||||
<Logger name="SecurityLogger" level="${sys:hbase.security.logger.level:-info}"
|
||||
additivity="false">
|
||||
<AppenderRef ref="${sys:hbase.security.logger.appender:-console}" />
|
||||
</Logger>
|
||||
<!-- Custom Logging levels -->
|
||||
<!--
|
||||
<Logger name="org.apache.zookeeper" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.fs.FSNamesystem" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase.META" level="debug"/>
|
||||
Make these two classes below DEBUG to see more zk debug.
|
||||
<Logger name="org.apache.hadoop.hbase.zookeeper.ZKUtil" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase.zookeeper.ZKWatcher" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.dfs" level="debug"/>
|
||||
-->
|
||||
<!-- Prevent metrics subsystem start/stop messages (HBASE-17722) -->
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsConfig" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSinkAdapter" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSystemImpl" level="warn" />
|
||||
<!-- Disable request log by default, you can enable this by changing the appender -->
|
||||
<Logger name="http.requests" level="info" additivity="false">
|
||||
<AppenderRef ref="NullAppender" />
|
||||
</Logger>
|
||||
<!--
|
||||
Replace the above with this configuration if you want an http access.log
|
||||
<Logger name="http.requests" level="info" additivity="false">
|
||||
<AppenderRef ref="AccessRFA" />
|
||||
</Logger>
|
||||
-->
|
||||
</Loggers>
|
||||
</Configuration>
|
|
@ -0,0 +1,137 @@
|
|||
#/**
|
||||
# * Licensed to the Apache Software Foundation (ASF) under one
|
||||
# * or more contributor license agreements. See the NOTICE file
|
||||
# * distributed with this work for additional information
|
||||
# * regarding copyright ownership. The ASF licenses this file
|
||||
# * to you under the Apache License, Version 2.0 (the
|
||||
# * "License"); you may not use this file except in compliance
|
||||
# * with the License. You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.apache.org/licenses/LICENSE-2.0
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# */
|
||||
|
||||
status = warn
|
||||
dest = err
|
||||
name = PropertiesConfig
|
||||
|
||||
# Console appender
|
||||
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
|
||||
|
||||
# Daily Rolling File Appender
|
||||
appender.DRFA.type = RollingFile
|
||||
appender.DRFA.name = DRFA
|
||||
appender.DRFA.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}
|
||||
appender.DRFA.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}
|
||||
appender.DRFA.createOnDemand = true
|
||||
appender.DRFA.layout.type = PatternLayout
|
||||
appender.DRFA.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.DRFA.policies.type = Policies
|
||||
appender.DRFA.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.DRFA.policies.time.interval = 1
|
||||
appender.DRFA.policies.time.modulate = true
|
||||
appender.DRFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.DRFA.policies.size.size = ${sys:hbase.log.maxfilesize:-256MB}
|
||||
appender.DRFA.strategy.type = DefaultRolloverStrategy
|
||||
appender.DRFA.strategy.max = ${sys:hbase.log.maxbackupindex:-20}
|
||||
|
||||
# Rolling File Appender
|
||||
appender.RFA.type = RollingFile
|
||||
appender.RFA.name = RFA
|
||||
appender.RFA.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}
|
||||
appender.RFA.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i
|
||||
appender.RFA.createOnDemand = true
|
||||
appender.RFA.layout.type = PatternLayout
|
||||
appender.RFA.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.RFA.policies.type = Policies
|
||||
appender.RFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.RFA.policies.size.size = ${sys:hbase.log.maxfilesize:-256MB}
|
||||
appender.RFA.strategy.type = DefaultRolloverStrategy
|
||||
appender.RFA.strategy.max = ${sys:hbase.log.maxbackupindex:-20}
|
||||
|
||||
# Security Audit Appender
|
||||
appender.RFAS.type = RollingFile
|
||||
appender.RFAS.name = RFAS
|
||||
appender.RFAS.fileName = ${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}
|
||||
appender.RFAS.filePattern = ${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i
|
||||
appender.RFAS.createOnDemand = true
|
||||
appender.RFAS.layout.type = PatternLayout
|
||||
appender.RFAS.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %.1000m%n
|
||||
appender.RFAS.policies.type = Policies
|
||||
appender.RFAS.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.RFAS.policies.size.size = ${sys:hbase.security.log.maxfilesize:-256MB}
|
||||
appender.RFAS.strategy.type = DefaultRolloverStrategy
|
||||
appender.RFAS.strategy.max = ${sys:hbase.security.log.maxbackupindex:-20}
|
||||
|
||||
# Http Access Log RFA, uncomment this if you want an http access.log
|
||||
# appender.AccessRFA.type = RollingFile
|
||||
# appender.AccessRFA.name = AccessRFA
|
||||
# appender.AccessRFA.fileName = /var/log/hbase/access.log
|
||||
# appender.AccessRFA.filePattern = /var/log/hbase/access.log.%i
|
||||
# appender.AccessRFA.createOnDemand = true
|
||||
# appender.AccessRFA.layout.type = PatternLayout
|
||||
# appender.AccessRFA.layout.pattern = %m%n
|
||||
# appender.AccessRFA.policies.type = Policies
|
||||
# appender.AccessRFA.policies.size.type = SizeBasedTriggeringPolicy
|
||||
# appender.AccessRFA.policies.size.size = 200MB
|
||||
# appender.AccessRFA.strategy.type = DefaultRolloverStrategy
|
||||
# appender.AccessRFA.strategy.max = 10
|
||||
|
||||
# Null Appender
|
||||
appender.NullAppender.type = Null
|
||||
appender.NullAppender.name = NullAppender
|
||||
|
||||
rootLogger = ${sys:hbase.root.logger:-INFO,console}
|
||||
|
||||
logger.SecurityLogger.name = SecurityLogger
|
||||
logger.SecurityLogger = ${sys:hbase.security.logger:-INFO,console}
|
||||
logger.SecurityLogger.additivity = false
|
||||
|
||||
# Custom Logging levels
|
||||
# logger.zookeeper.name = org.apache.zookeeper
|
||||
# logger.zookeeper.level = ERROR
|
||||
|
||||
# logger.FSNamesystem.name = org.apache.hadoop.fs.FSNamesystem
|
||||
# logger.FSNamesystem.level = DEBUG
|
||||
|
||||
# logger.hbase.name = org.apache.hadoop.hbase
|
||||
# logger.hbase.level = DEBUG
|
||||
|
||||
# logger.META.name = org.apache.hadoop.hbase.META
|
||||
# logger.META.level = DEBUG
|
||||
|
||||
# Make these two classes below DEBUG to see more zk debug.
|
||||
# logger.ZKUtil.name = org.apache.hadoop.hbase.zookeeper.ZKUtil
|
||||
# logger.ZKUtil.level = DEBUG
|
||||
|
||||
# logger.ZKWatcher.name = org.apache.hadoop.hbase.zookeeper.ZKWatcher
|
||||
# logger.ZKWatcher.level = DEBUG
|
||||
|
||||
# logger.dfs.name = org.apache.hadoop.dfs
|
||||
# logger.dfs.level = DEBUG
|
||||
|
||||
# Prevent metrics subsystem start/stop messages (HBASE-17722)
|
||||
logger.MetricsConfig.name = org.apache.hadoop.metrics2.impl.MetricsConfig
|
||||
logger.MetricsConfig.level = WARN
|
||||
|
||||
logger.MetricsSinkAdapte.name = org.apache.hadoop.metrics2.impl.MetricsSinkAdapter
|
||||
logger.MetricsSinkAdapte.level = WARN
|
||||
|
||||
logger.MetricsSystemImpl.name = org.apache.hadoop.metrics2.impl.MetricsSystemImpl
|
||||
logger.MetricsSystemImpl.level = WARN
|
||||
|
||||
# Disable request log by default, you can enable this by changing the appender
|
||||
logger.http.name = http.requests
|
||||
logger.http.additivity = false
|
||||
logger.http = INFO,NullAppender
|
||||
# Replace the above with this configuration if you want an http access.log
|
||||
# logger.http = INFO,AccessRFA
|
|
@ -1,109 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<Configuration>
|
||||
<Appenders>
|
||||
<!-- Console appender -->
|
||||
<Console name="console" target="SYSTEM_ERR">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
</Console>
|
||||
<!-- 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}"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30" />
|
||||
</RollingFile>
|
||||
<!-- 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"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="256MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="20" />
|
||||
</RollingFile>
|
||||
<!-- 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"
|
||||
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, 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"
|
||||
createOnDemand="true">
|
||||
<PatternLayout pattern="%m%n" />
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="200MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10" />
|
||||
</RollingFile>
|
||||
-->
|
||||
<Null name="NullAppender" />
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="${sys:hbase.root.logger.level:-info}">
|
||||
<AppenderRef ref="${sys:hbase.root.logger.appender:-console}" />
|
||||
</Root>
|
||||
<Logger name="SecurityLogger" level="${sys:hbase.security.logger.level:-info}"
|
||||
additivity="false">
|
||||
<AppenderRef ref="${sys:hbase.security.logger.appender:-console}" />
|
||||
</Logger>
|
||||
<!-- Custom Logging levels -->
|
||||
<!--
|
||||
<Logger name="org.apache.zookeeper" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.fs.FSNamesystem" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase.META" level="debug"/>
|
||||
Make these two classes below DEBUG to see more zk debug.
|
||||
<Logger name="org.apache.hadoop.hbase.zookeeper.ZKUtil" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.hbase.zookeeper.ZKWatcher" level="debug"/>
|
||||
<Logger name="org.apache.hadoop.dfs" level="debug"/>
|
||||
-->
|
||||
<!-- Prevent metrics subsystem start/stop messages (HBASE-17722) -->
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsConfig" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSinkAdapter" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSystemImpl" level="warn" />
|
||||
<!-- Disable request log by default, you can enable this by changing the appender -->
|
||||
<Logger name="http.requests" level="info" additivity="false">
|
||||
<AppenderRef ref="NullAppender" />
|
||||
</Logger>
|
||||
<!--
|
||||
Replace the above with this configuration if you want an http access.log
|
||||
<Logger name="http.requests" level="info" additivity="false">
|
||||
<AppenderRef ref="AccessRFA" />
|
||||
</Logger>
|
||||
-->
|
||||
</Loggers>
|
||||
</Configuration>
|
|
@ -38,7 +38,7 @@
|
|||
<testResource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>log4j2.xml</include>
|
||||
<include>log4j2.properties</include>
|
||||
</includes>
|
||||
</testResource>
|
||||
</testResources>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
#/**
|
||||
# * Licensed to the Apache Software Foundation (ASF) under one
|
||||
# * or more contributor license agreements. See the NOTICE file
|
||||
# * distributed with this work for additional information
|
||||
# * regarding copyright ownership. The ASF licenses this file
|
||||
# * to you under the Apache License, Version 2.0 (the
|
||||
# * "License"); you may not use this file except in compliance
|
||||
# * with the License. You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.apache.org/licenses/LICENSE-2.0
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# */
|
||||
|
||||
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}(%L): %m%n
|
||||
|
||||
rootLogger = INFO,Console
|
||||
|
||||
logger.hadoop.name = org.apache.hadoop
|
||||
logger.hadoop.level = WARN
|
||||
|
||||
logger.zookeeper.name = org.apache.zookeeper
|
||||
logger.zookeeper.level = ERROR
|
||||
|
||||
logger.hbase.name = org.apache.zookeeper
|
||||
logger.hbase.level = DEBUG
|
||||
|
||||
# These settings are workarounds against spurious logs from the minicluster. See HBASE-4709
|
||||
logger.MetricsConfig.name = org.apache.hadoop.metrics2.impl.MetricsConfig
|
||||
logger.MetricsConfig.level = WARN
|
||||
|
||||
logger.MetricsSinkAdapter.name = org.apache.hadoop.metrics2.impl.MetricsSinkAdapter
|
||||
logger.MetricsSinkAdapter.level = WARN
|
||||
|
||||
logger.MetricsSystemImpl.name = org.apache.hadoop.metrics2.impl.MetricsSystemImpl
|
||||
logger.MetricsSystemImpl.level = WARN
|
||||
|
||||
logger.MBeans.name = org.apache.hadoop.metrics2.util.MBeans
|
||||
logger.MBeans.level = WARN
|
||||
|
||||
logger.directory.name = org.apache.directory
|
||||
logger.directory.level = WARN
|
||||
logger.directory.additivity = false
|
||||
|
||||
logger.netty.name = org.apache.hbase.thirdparty.io.netty.channel
|
||||
logger.netty.level = DEBUG
|
||||
|
||||
# For testing where we want to capture the log message of these special loggers
|
||||
logger.FailedServers.name = org.apache.hadoop.hbase.ipc.FailedServers
|
||||
logger.FailedServers.level = DEBUG
|
||||
|
||||
logger.RSRpcServices.name = org.apache.hadoop.hbase.regionserver.RSRpcServices
|
||||
logger.RSRpcServices.level = DEBUG
|
||||
|
||||
logger.TestJul2Slf4j.name = org.apache.hadoop.hbase.logging.TestJul2Slf4j
|
||||
logger.TestJul2Slf4j.level = DEBUG
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<Configuration>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_ERR">
|
||||
<PatternLayout pattern="%d{ISO8601} %-5p [%t] %C{2}(%L): %m%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
<Logger name="org.apache.hadoop" level="warn" />
|
||||
<Logger name="org.apache.zookeeper" level="error" />
|
||||
<Logger name="org.apache.hadoop.hbase" level="debug" />
|
||||
<!-- These settings are workarounds against spurious logs from the minicluster. See HBASE-4709 -->
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsConfig" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSinkAdapter" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.impl.MetricsSystemImpl" level="warn" />
|
||||
<Logger name="org.apache.hadoop.metrics2.util.MBeans" level="warn" />
|
||||
<Logger name="org.apache.directory" level="warn" additivity="false" />
|
||||
<Logger name="org.apache.hbase.thirdparty.io.netty.channel" level="debug" />
|
||||
<!-- For testing where we want to capture the log message of these special loggers -->
|
||||
<Logger name="org.apache.hadoop.hbase.ipc.FailedServers" level="debug" />
|
||||
<Logger name="org.apache.hadoop.hbase.regionserver.RSRpcServices" level="debug" />
|
||||
<Logger name="org.apache.hadoop.hbase.logging.TestJul2Slf4j" level="debug" />
|
||||
</Loggers>
|
||||
</Configuration>
|
|
@ -130,8 +130,8 @@ public class ProcedureEvent<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + " for " + object + ", ready=" + isReady() +
|
||||
", " + suspendedProcedures;
|
||||
public synchronized String toString() {
|
||||
return getClass().getSimpleName() + " for " + object + ", ready=" + isReady() + ", " +
|
||||
suspendedProcedures;
|
||||
}
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -1787,7 +1787,7 @@
|
|||
<hamcrest.version>1.3</hamcrest.version>
|
||||
<opentelemetry.version>1.0.1</opentelemetry.version>
|
||||
<opentelemetry-javaagent.version>1.0.1</opentelemetry-javaagent.version>
|
||||
<log4j2.version>2.17.1</log4j2.version>
|
||||
<log4j2.version>2.17.2</log4j2.version>
|
||||
<mockito-core.version>2.28.2</mockito-core.version>
|
||||
<protobuf.plugin.version>0.6.1</protobuf.plugin.version>
|
||||
<thrift.path>thrift</thrift.path>
|
||||
|
|
Loading…
Reference in New Issue