1 <?xml version="1.0" encoding="UTF-8"?>
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 <!-- Console appender -->
24 <Console name="console" target="SYSTEM_ERR">
25 <PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
27 <!-- Daily Rolling File Appender -->
28 <RollingFile name="DRFA"
29 fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
30 filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%d{yyyy-MM-dd}"
31 createOnDemand="true">
32 <PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
34 <TimeBasedTriggeringPolicy interval="1" />
36 <DefaultRolloverStrategy max="30" />
38 <!-- Rolling File Appender -->
39 <RollingFile name="RFA"
40 fileName="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}"
41 filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.log.file:-hbase.log}.%i"
42 createOnDemand="true">
43 <PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
45 <SizeBasedTriggeringPolicy size="256MB" />
47 <DefaultRolloverStrategy max="20" />
49 <!-- Security audit appender -->
50 <RollingFile name="RFAS"
51 fileName="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}"
52 filePattern="${sys:hbase.log.dir:-.}/${sys:hbase.security.log.file:-SecurityAuth.audit}.%i"
53 createOnDemand="true">
54 <PatternLayout pattern="%d{ISO8601} %-5p [%t] %c{2}: %.1000m%n" />
56 <SizeBasedTriggeringPolicy size="256MB" />
58 <DefaultRolloverStrategy max="20" />
61 Http Access Log RFA, uncomment this if you want an http access.log
62 <RollingFile name="AccessRFA"
63 fileName="/var/log/hbase/access.log"
64 filePattern="/var/log/hbase/access.log.%i"
65 createOnDemand="true">
66 <PatternLayout pattern="%m%n" />
68 <SizeBasedTriggeringPolicy size="200MB" />
70 <DefaultRolloverStrategy max="10" />
73 <Null name="NullAppender" />
76 <Root level="${sys:hbase.root.logger.level:-info}">
77 <AppenderRef ref="${sys:hbase.root.logger.appender:-console}" />
79 <Logger name="SecurityLogger" level="${sys:hbase.security.logger.level:-info}"
81 <AppenderRef ref="${sys:hbase.security.logger.appender:-console}" />
83 <!-- Custom Logging levels -->
85 <Logger name="org.apache.zookeeper" level="debug"/>
86 <Logger name="org.apache.hadoop.fs.FSNamesystem" level="debug"/>
87 <Logger name="org.apache.hadoop.hbase" level="debug"/>
88 <Logger name="org.apache.hadoop.hbase.META" level="debug"/>
89 Make these two classes below DEBUG to see more zk debug.
90 <Logger name="org.apache.hadoop.hbase.zookeeper.ZKUtil" level="debug"/>
91 <Logger name="org.apache.hadoop.hbase.zookeeper.ZKWatcher" level="debug"/>
92 <Logger name="org.apache.hadoop.dfs" level="debug"/>
94 <!-- Prevent metrics subsystem start/stop messages (HBASE-17722) -->
95 <Logger name="org.apache.hadoop.metrics2.impl.MetricsConfig" level="warn" />
96 <Logger name="org.apache.hadoop.metrics2.impl.MetricsSinkAdapter" level="warn" />
97 <Logger name="org.apache.hadoop.metrics2.impl.MetricsSystemImpl" level="warn" />
98 <!-- Disable request log by default, you can enable this by changing the appender -->
99 <Logger name="http.requests" level="info" additivity="false">
100 <AppenderRef ref="NullAppender" />
103 Replace the above with this configuration if you want an http access.log
104 <Logger name="http.requests" level="info" additivity="false">
105 <AppenderRef ref="AccessRFA" />