log4j.properties 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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. hadoop.root.logger=INFO,console
  18. hadoop.log.dir=.
  19. hadoop.log.file=hadoop.log
  20. # Define the root logger to the system property "hadoop.root.logger".
  21. log4j.rootLogger=${hadoop.root.logger}, EventCounter
  22. # Logging Threshold
  23. log4j.threshold=ALL
  24. # Null Appender
  25. log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender
  26. #
  27. # Rolling File Appender - cap space usage at 5gb.
  28. #
  29. hadoop.log.maxfilesize=256MB
  30. hadoop.log.maxbackupindex=20
  31. log4j.appender.RFA=org.apache.log4j.RollingFileAppender
  32. log4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}
  33. log4j.appender.RFA.MaxFileSize=${hadoop.log.maxfilesize}
  34. log4j.appender.RFA.MaxBackupIndex=${hadoop.log.maxbackupindex}
  35. log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
  36. # Pattern format: Date LogLevel LoggerName LogMessage
  37. log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  38. # Debugging Pattern format
  39. #log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
  40. #
  41. # Daily Rolling File Appender
  42. #
  43. log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
  44. log4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}
  45. # Rollover at midnight
  46. log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
  47. log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
  48. # Pattern format: Date LogLevel LoggerName LogMessage
  49. log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  50. # Debugging Pattern format
  51. #log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
  52. #
  53. # console
  54. # Add "console" to rootlogger above if you want to use this
  55. #
  56. log4j.appender.console=org.apache.log4j.ConsoleAppender
  57. log4j.appender.console.target=System.err
  58. log4j.appender.console.layout=org.apache.log4j.PatternLayout
  59. log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
  60. #
  61. # TaskLog Appender
  62. #
  63. #Default values
  64. hadoop.tasklog.taskid=null
  65. hadoop.tasklog.iscleanup=false
  66. hadoop.tasklog.noKeepSplits=4
  67. hadoop.tasklog.totalLogFileSize=100
  68. hadoop.tasklog.purgeLogSplits=true
  69. hadoop.tasklog.logsRetainHours=12
  70. log4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender
  71. log4j.appender.TLA.taskId=${hadoop.tasklog.taskid}
  72. log4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}
  73. log4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}
  74. log4j.appender.TLA.layout=org.apache.log4j.PatternLayout
  75. log4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  76. #
  77. # HDFS block state change log from block manager
  78. #
  79. # Uncomment the following to suppress normal block state change
  80. # messages from BlockManager in NameNode.
  81. #log4j.logger.BlockStateChange=WARN
  82. #
  83. #Security appender
  84. #
  85. hadoop.security.logger=INFO,NullAppender
  86. hadoop.security.log.maxfilesize=256MB
  87. hadoop.security.log.maxbackupindex=20
  88. log4j.category.SecurityLogger=${hadoop.security.logger}
  89. hadoop.security.log.file=SecurityAuth-${user.name}.audit
  90. log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
  91. log4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}
  92. log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
  93. log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  94. log4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}
  95. log4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}
  96. #
  97. # Daily Rolling Security appender
  98. #
  99. log4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender
  100. log4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}
  101. log4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout
  102. log4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  103. log4j.appender.DRFAS.DatePattern=.yyyy-MM-dd
  104. #
  105. # hadoop configuration logging
  106. #
  107. # Uncomment the following line to turn off configuration deprecation warnings.
  108. # log4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN
  109. #
  110. # hdfs audit logging
  111. #
  112. hdfs.audit.logger=INFO,NullAppender
  113. hdfs.audit.log.maxfilesize=256MB
  114. hdfs.audit.log.maxbackupindex=20
  115. log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}
  116. log4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=false
  117. log4j.appender.RFAAUDIT=org.apache.log4j.RollingFileAppender
  118. log4j.appender.RFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log
  119. log4j.appender.RFAAUDIT.layout=org.apache.log4j.PatternLayout
  120. log4j.appender.RFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  121. log4j.appender.RFAAUDIT.MaxFileSize=${hdfs.audit.log.maxfilesize}
  122. log4j.appender.RFAAUDIT.MaxBackupIndex=${hdfs.audit.log.maxbackupindex}
  123. #
  124. # mapred audit logging
  125. #
  126. mapred.audit.logger=INFO,NullAppender
  127. mapred.audit.log.maxfilesize=256MB
  128. mapred.audit.log.maxbackupindex=20
  129. log4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}
  130. log4j.additivity.org.apache.hadoop.mapred.AuditLogger=false
  131. log4j.appender.MRAUDIT=org.apache.log4j.RollingFileAppender
  132. log4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log
  133. log4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout
  134. log4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  135. log4j.appender.MRAUDIT.MaxFileSize=${mapred.audit.log.maxfilesize}
  136. log4j.appender.MRAUDIT.MaxBackupIndex=${mapred.audit.log.maxbackupindex}
  137. # Custom Logging levels
  138. #log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG
  139. #log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG
  140. #log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=DEBUG
  141. # Jets3t library
  142. log4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR
  143. # AWS SDK & S3A FileSystem
  144. log4j.logger.com.amazonaws=ERROR
  145. log4j.logger.com.amazonaws.http.AmazonHttpClient=ERROR
  146. log4j.logger.org.apache.hadoop.fs.s3a.S3AFileSystem=WARN
  147. #
  148. # Event Counter Appender
  149. # Sends counts of logging messages at different severity levels to Hadoop Metrics.
  150. #
  151. log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter
  152. #
  153. # Job Summary Appender
  154. #
  155. # Use following logger to send summary to separate file defined by
  156. # hadoop.mapreduce.jobsummary.log.file :
  157. # hadoop.mapreduce.jobsummary.logger=INFO,JSA
  158. #
  159. hadoop.mapreduce.jobsummary.logger=${hadoop.root.logger}
  160. hadoop.mapreduce.jobsummary.log.file=hadoop-mapreduce.jobsummary.log
  161. hadoop.mapreduce.jobsummary.log.maxfilesize=256MB
  162. hadoop.mapreduce.jobsummary.log.maxbackupindex=20
  163. log4j.appender.JSA=org.apache.log4j.RollingFileAppender
  164. log4j.appender.JSA.File=${hadoop.log.dir}/${hadoop.mapreduce.jobsummary.log.file}
  165. log4j.appender.JSA.MaxFileSize=${hadoop.mapreduce.jobsummary.log.maxfilesize}
  166. log4j.appender.JSA.MaxBackupIndex=${hadoop.mapreduce.jobsummary.log.maxbackupindex}
  167. log4j.appender.JSA.layout=org.apache.log4j.PatternLayout
  168. log4j.appender.JSA.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
  169. log4j.logger.org.apache.hadoop.mapred.JobInProgress$JobSummary=${hadoop.mapreduce.jobsummary.logger}
  170. log4j.additivity.org.apache.hadoop.mapred.JobInProgress$JobSummary=false
  171. #
  172. # Yarn ResourceManager Application Summary Log
  173. #
  174. # Set the ResourceManager summary log filename
  175. yarn.server.resourcemanager.appsummary.log.file=rm-appsummary.log
  176. # Set the ResourceManager summary log level and appender
  177. yarn.server.resourcemanager.appsummary.logger=${hadoop.root.logger}
  178. #yarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY
  179. # To enable AppSummaryLogging for the RM,
  180. # set yarn.server.resourcemanager.appsummary.logger to
  181. # <LEVEL>,RMSUMMARY in hadoop-env.sh
  182. # Appender for ResourceManager Application Summary Log
  183. # Requires the following properties to be set
  184. # - hadoop.log.dir (Hadoop Log directory)
  185. # - yarn.server.resourcemanager.appsummary.log.file (resource manager app summary log filename)
  186. # - yarn.server.resourcemanager.appsummary.logger (resource manager app summary log level and appender)
  187. log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=${yarn.server.resourcemanager.appsummary.logger}
  188. log4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=false
  189. log4j.appender.RMSUMMARY=org.apache.log4j.RollingFileAppender
  190. log4j.appender.RMSUMMARY.File=${hadoop.log.dir}/${yarn.server.resourcemanager.appsummary.log.file}
  191. log4j.appender.RMSUMMARY.MaxFileSize=256MB
  192. log4j.appender.RMSUMMARY.MaxBackupIndex=20
  193. log4j.appender.RMSUMMARY.layout=org.apache.log4j.PatternLayout
  194. log4j.appender.RMSUMMARY.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  195. # HS audit log configs
  196. #mapreduce.hs.audit.logger=INFO,HSAUDIT
  197. #log4j.logger.org.apache.hadoop.mapreduce.v2.hs.HSAuditLogger=${mapreduce.hs.audit.logger}
  198. #log4j.additivity.org.apache.hadoop.mapreduce.v2.hs.HSAuditLogger=false
  199. #log4j.appender.HSAUDIT=org.apache.log4j.DailyRollingFileAppender
  200. #log4j.appender.HSAUDIT.File=${hadoop.log.dir}/hs-audit.log
  201. #log4j.appender.HSAUDIT.layout=org.apache.log4j.PatternLayout
  202. #log4j.appender.HSAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  203. #log4j.appender.HSAUDIT.DatePattern=.yyyy-MM-dd
  204. # Http Server Request Logs
  205. #log4j.logger.http.requests.namenode=INFO,namenoderequestlog
  206. #log4j.appender.namenoderequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  207. #log4j.appender.namenoderequestlog.Filename=${hadoop.log.dir}/jetty-namenode-yyyy_mm_dd.log
  208. #log4j.appender.namenoderequestlog.RetainDays=3
  209. #log4j.logger.http.requests.datanode=INFO,datanoderequestlog
  210. #log4j.appender.datanoderequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  211. #log4j.appender.datanoderequestlog.Filename=${hadoop.log.dir}/jetty-datanode-yyyy_mm_dd.log
  212. #log4j.appender.datanoderequestlog.RetainDays=3
  213. #log4j.logger.http.requests.resourcemanager=INFO,resourcemanagerrequestlog
  214. #log4j.appender.resourcemanagerrequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  215. #log4j.appender.resourcemanagerrequestlog.Filename=${hadoop.log.dir}/jetty-resourcemanager-yyyy_mm_dd.log
  216. #log4j.appender.resourcemanagerrequestlog.RetainDays=3
  217. #log4j.logger.http.requests.jobhistory=INFO,jobhistoryrequestlog
  218. #log4j.appender.jobhistoryrequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  219. #log4j.appender.jobhistoryrequestlog.Filename=${hadoop.log.dir}/jetty-jobhistory-yyyy_mm_dd.log
  220. #log4j.appender.jobhistoryrequestlog.RetainDays=3
  221. #log4j.logger.http.requests.nodemanager=INFO,nodemanagerrequestlog
  222. #log4j.appender.nodemanagerrequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  223. #log4j.appender.nodemanagerrequestlog.Filename=${hadoop.log.dir}/jetty-nodemanager-yyyy_mm_dd.log
  224. #log4j.appender.nodemanagerrequestlog.RetainDays=3