log4j.properties 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Define some default values that can be overridden by system properties
  17. hbase.root.logger=INFO,console
  18. hbase.security.logger=INFO,console
  19. hbase.log.dir=.
  20. hbase.log.file=hbase.log
  21. # Define the root logger to the system property "hbase.root.logger".
  22. log4j.rootLogger=${hbase.root.logger}
  23. # Logging Threshold
  24. log4j.threshold=ALL
  25. #
  26. # Daily Rolling File Appender
  27. #
  28. log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
  29. log4j.appender.DRFA.File=${hbase.log.dir}/${hbase.log.file}
  30. # Rollver at midnight
  31. log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
  32. # 30-day backup
  33. #log4j.appender.DRFA.MaxBackupIndex=30
  34. log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
  35. # Pattern format: Date LogLevel LoggerName LogMessage
  36. log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
  37. # Rolling File Appender properties
  38. hbase.log.maxfilesize=256MB
  39. hbase.log.maxbackupindex=20
  40. # Rolling File Appender
  41. log4j.appender.RFA=org.apache.log4j.RollingFileAppender
  42. log4j.appender.RFA.File=${hbase.log.dir}/${hbase.log.file}
  43. log4j.appender.RFA.MaxFileSize=${hbase.log.maxfilesize}
  44. log4j.appender.RFA.MaxBackupIndex=${hbase.log.maxbackupindex}
  45. log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
  46. log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
  47. #
  48. # Security audit appender
  49. #
  50. hbase.security.log.file=SecurityAuth.audit
  51. hbase.security.log.maxfilesize=256MB
  52. hbase.security.log.maxbackupindex=20
  53. log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
  54. log4j.appender.RFAS.File=${hbase.log.dir}/${hbase.security.log.file}
  55. log4j.appender.RFAS.MaxFileSize=${hbase.security.log.maxfilesize}
  56. log4j.appender.RFAS.MaxBackupIndex=${hbase.security.log.maxbackupindex}
  57. log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
  58. log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  59. log4j.category.SecurityLogger=${hbase.security.logger}
  60. log4j.additivity.SecurityLogger=false
  61. #log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE
  62. #log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.visibility.VisibilityController=TRACE
  63. #
  64. # Null Appender
  65. #
  66. log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender
  67. #
  68. # console
  69. # Add "console" to rootlogger above if you want to use this
  70. #
  71. log4j.appender.console=org.apache.log4j.ConsoleAppender
  72. log4j.appender.console.target=System.err
  73. log4j.appender.console.layout=org.apache.log4j.PatternLayout
  74. log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
  75. # Custom Logging levels
  76. log4j.logger.org.apache.zookeeper=INFO
  77. #log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG
  78. log4j.logger.org.apache.hadoop.hbase=INFO
  79. # Make these two classes INFO-level. Make them DEBUG to see more zk debug.
  80. log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKUtil=INFO
  81. log4j.logger.org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher=INFO
  82. #log4j.logger.org.apache.hadoop.dfs=DEBUG
  83. # Set this class to log INFO only otherwise its OTT
  84. # Enable this to get detailed connection error/retry logging.
  85. # log4j.logger.org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation=TRACE
  86. # Uncomment this line to enable tracing on _every_ RPC call (this can be a lot of output)
  87. #log4j.logger.org.apache.hadoop.ipc.HBaseServer.trace=DEBUG
  88. # Uncomment the below if you want to remove logging of client region caching'
  89. # and scan of hbase:meta messages
  90. # log4j.logger.org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation=INFO
  91. # log4j.logger.org.apache.hadoop.hbase.client.MetaScanner=INFO
  92. # Prevent metrics subsystem start/stop messages (HBASE-17722)
  93. log4j.logger.org.apache.hadoop.metrics2.impl.MetricsConfig=WARN
  94. log4j.logger.org.apache.hadoop.metrics2.impl.MetricsSinkAdapter=WARN
  95. log4j.logger.org.apache.hadoop.metrics2.impl.MetricsSystemImpl=WARN