log4j.properties 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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{ISO8601} %p %c{2}: %m%n
  60. #
  61. # TaskLog Appender
  62. #
  63. log4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender
  64. log4j.appender.TLA.layout=org.apache.log4j.PatternLayout
  65. log4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  66. #
  67. # HDFS block state change log from block manager
  68. #
  69. # Uncomment the following to log normal block state change
  70. # messages from BlockManager in NameNode.
  71. #log4j.logger.BlockStateChange=DEBUG
  72. #
  73. #Security appender
  74. #
  75. hadoop.security.logger=INFO,NullAppender
  76. hadoop.security.log.maxfilesize=256MB
  77. hadoop.security.log.maxbackupindex=20
  78. log4j.category.SecurityLogger=${hadoop.security.logger}
  79. hadoop.security.log.file=SecurityAuth-${user.name}.audit
  80. log4j.appender.RFAS=org.apache.log4j.RollingFileAppender
  81. log4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}
  82. log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout
  83. log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  84. log4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}
  85. log4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}
  86. #
  87. # Daily Rolling Security appender
  88. #
  89. log4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender
  90. log4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}
  91. log4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout
  92. log4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  93. log4j.appender.DRFAS.DatePattern=.yyyy-MM-dd
  94. #
  95. # hadoop configuration logging
  96. #
  97. # Uncomment the following line to turn off configuration deprecation warnings.
  98. # log4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN
  99. #
  100. # hdfs audit logging
  101. #
  102. hdfs.audit.logger=INFO,NullAppender
  103. hdfs.audit.log.maxfilesize=256MB
  104. hdfs.audit.log.maxbackupindex=20
  105. log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}
  106. log4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=false
  107. log4j.appender.RFAAUDIT=org.apache.log4j.RollingFileAppender
  108. log4j.appender.RFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log
  109. log4j.appender.RFAAUDIT.layout=org.apache.log4j.PatternLayout
  110. log4j.appender.RFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  111. log4j.appender.RFAAUDIT.MaxFileSize=${hdfs.audit.log.maxfilesize}
  112. log4j.appender.RFAAUDIT.MaxBackupIndex=${hdfs.audit.log.maxbackupindex}
  113. #
  114. # NameNode metrics logging.
  115. # The default is to retain two namenode-metrics.log files up to 64MB each.
  116. #
  117. namenode.metrics.logger=INFO,NullAppender
  118. log4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}
  119. log4j.additivity.NameNodeMetricsLog=false
  120. log4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender
  121. log4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log
  122. log4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout
  123. log4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n
  124. log4j.appender.NNMETRICSRFA.MaxBackupIndex=1
  125. log4j.appender.NNMETRICSRFA.MaxFileSize=64MB
  126. #
  127. # DataNode metrics logging.
  128. # The default is to retain two datanode-metrics.log files up to 64MB each.
  129. #
  130. datanode.metrics.logger=INFO,NullAppender
  131. log4j.logger.DataNodeMetricsLog=${datanode.metrics.logger}
  132. log4j.additivity.DataNodeMetricsLog=false
  133. log4j.appender.DNMETRICSRFA=org.apache.log4j.RollingFileAppender
  134. log4j.appender.DNMETRICSRFA.File=${hadoop.log.dir}/datanode-metrics.log
  135. log4j.appender.DNMETRICSRFA.layout=org.apache.log4j.PatternLayout
  136. log4j.appender.DNMETRICSRFA.layout.ConversionPattern=%d{ISO8601} %m%n
  137. log4j.appender.DNMETRICSRFA.MaxBackupIndex=1
  138. log4j.appender.DNMETRICSRFA.MaxFileSize=64MB
  139. # Custom Logging levels
  140. #log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG
  141. #log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG
  142. #log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=DEBUG
  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{ISO8601} %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. # shuffle connection log from shuffleHandler
  173. # Uncomment the following line to enable logging of shuffle connections
  174. # log4j.logger.org.apache.hadoop.mapred.ShuffleHandler.audit=DEBUG
  175. #
  176. # Yarn ResourceManager Application Summary Log
  177. #
  178. # Set the ResourceManager summary log filename
  179. yarn.server.resourcemanager.appsummary.log.file=rm-appsummary.log
  180. # Set the ResourceManager summary log level and appender
  181. yarn.server.resourcemanager.appsummary.logger=${hadoop.root.logger}
  182. #yarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY
  183. # To enable AppSummaryLogging for the RM,
  184. # set yarn.server.resourcemanager.appsummary.logger to
  185. # <LEVEL>,RMSUMMARY in hadoop-env.sh
  186. # Appender for ResourceManager Application Summary Log
  187. # Requires the following properties to be set
  188. # - hadoop.log.dir (Hadoop Log directory)
  189. # - yarn.server.resourcemanager.appsummary.log.file (resource manager app summary log filename)
  190. # - yarn.server.resourcemanager.appsummary.logger (resource manager app summary log level and appender)
  191. log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=${yarn.server.resourcemanager.appsummary.logger}
  192. log4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=false
  193. log4j.appender.RMSUMMARY=org.apache.log4j.RollingFileAppender
  194. log4j.appender.RMSUMMARY.File=${hadoop.log.dir}/${yarn.server.resourcemanager.appsummary.log.file}
  195. log4j.appender.RMSUMMARY.MaxFileSize=256MB
  196. log4j.appender.RMSUMMARY.MaxBackupIndex=20
  197. log4j.appender.RMSUMMARY.layout=org.apache.log4j.PatternLayout
  198. log4j.appender.RMSUMMARY.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  199. #
  200. # YARN ResourceManager audit logging
  201. #
  202. rm.audit.logger=INFO,NullAppender
  203. rm.audit.log.maxfilesize=256MB
  204. rm.audit.log.maxbackupindex=20
  205. log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger=${rm.audit.logger}
  206. log4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger=false
  207. log4j.appender.RMAUDIT=org.apache.log4j.RollingFileAppender
  208. log4j.appender.RMAUDIT.File=${hadoop.log.dir}/rm-audit.log
  209. log4j.appender.RMAUDIT.layout=org.apache.log4j.PatternLayout
  210. log4j.appender.RMAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  211. log4j.appender.RMAUDIT.MaxFileSize=${rm.audit.log.maxfilesize}
  212. log4j.appender.RMAUDIT.MaxBackupIndex=${rm.audit.log.maxbackupindex}
  213. #
  214. # YARN NodeManager audit logging
  215. #
  216. nm.audit.logger=INFO,NullAppender
  217. nm.audit.log.maxfilesize=256MB
  218. nm.audit.log.maxbackupindex=20
  219. log4j.logger.org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger=${nm.audit.logger}
  220. log4j.additivity.org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger=false
  221. log4j.appender.NMAUDIT=org.apache.log4j.RollingFileAppender
  222. log4j.appender.NMAUDIT.File=${hadoop.log.dir}/nm-audit.log
  223. log4j.appender.NMAUDIT.layout=org.apache.log4j.PatternLayout
  224. log4j.appender.NMAUDIT.layout.ConversionPattern=%d{ISO8601}%p %c{2}: %m%n
  225. log4j.appender.NMAUDIT.MaxFileSize=${nm.audit.log.maxfilesize}
  226. log4j.appender.NMAUDIT.MaxBackupIndex=${nm.audit.log.maxbackupindex}
  227. # HS audit log configs
  228. #mapreduce.hs.audit.logger=INFO,HSAUDIT
  229. #log4j.logger.org.apache.hadoop.mapreduce.v2.hs.HSAuditLogger=${mapreduce.hs.audit.logger}
  230. #log4j.additivity.org.apache.hadoop.mapreduce.v2.hs.HSAuditLogger=false
  231. #log4j.appender.HSAUDIT=org.apache.log4j.DailyRollingFileAppender
  232. #log4j.appender.HSAUDIT.File=${hadoop.log.dir}/hs-audit.log
  233. #log4j.appender.HSAUDIT.layout=org.apache.log4j.PatternLayout
  234. #log4j.appender.HSAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
  235. #log4j.appender.HSAUDIT.DatePattern=.yyyy-MM-dd
  236. # Http Server Request Logs
  237. #log4j.logger.http.requests.namenode=INFO,namenoderequestlog
  238. #log4j.appender.namenoderequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  239. #log4j.appender.namenoderequestlog.Filename=${hadoop.log.dir}/jetty-namenode-yyyy_mm_dd.log
  240. #log4j.appender.namenoderequestlog.RetainDays=3
  241. #log4j.logger.http.requests.datanode=INFO,datanoderequestlog
  242. #log4j.appender.datanoderequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  243. #log4j.appender.datanoderequestlog.Filename=${hadoop.log.dir}/jetty-datanode-yyyy_mm_dd.log
  244. #log4j.appender.datanoderequestlog.RetainDays=3
  245. #log4j.logger.http.requests.resourcemanager=INFO,resourcemanagerrequestlog
  246. #log4j.appender.resourcemanagerrequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  247. #log4j.appender.resourcemanagerrequestlog.Filename=${hadoop.log.dir}/jetty-resourcemanager-yyyy_mm_dd.log
  248. #log4j.appender.resourcemanagerrequestlog.RetainDays=3
  249. #log4j.logger.http.requests.jobhistory=INFO,jobhistoryrequestlog
  250. #log4j.appender.jobhistoryrequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  251. #log4j.appender.jobhistoryrequestlog.Filename=${hadoop.log.dir}/jetty-jobhistory-yyyy_mm_dd.log
  252. #log4j.appender.jobhistoryrequestlog.RetainDays=3
  253. #log4j.logger.http.requests.nodemanager=INFO,nodemanagerrequestlog
  254. #log4j.appender.nodemanagerrequestlog=org.apache.hadoop.http.HttpRequestLogAppender
  255. #log4j.appender.nodemanagerrequestlog.Filename=${hadoop.log.dir}/jetty-nodemanager-yyyy_mm_dd.log
  256. #log4j.appender.nodemanagerrequestlog.RetainDays=3
  257. # WebHdfs request log on datanodes
  258. # Specify -Ddatanode.webhdfs.logger=INFO,HTTPDRFA on datanode startup to
  259. # direct the log to a separate file.
  260. #datanode.webhdfs.logger=INFO,console
  261. #log4j.logger.datanode.webhdfs=${datanode.webhdfs.logger}
  262. #log4j.appender.HTTPDRFA=org.apache.log4j.DailyRollingFileAppender
  263. #log4j.appender.HTTPDRFA.File=${hadoop.log.dir}/hadoop-datanode-webhdfs.log
  264. #log4j.appender.HTTPDRFA.layout=org.apache.log4j.PatternLayout
  265. #log4j.appender.HTTPDRFA.layout.ConversionPattern=%d{ISO8601} %m%n
  266. #log4j.appender.HTTPDRFA.DatePattern=.yyyy-MM-dd
  267. # Appender for viewing information for errors and warnings
  268. yarn.ewma.cleanupInterval=300
  269. yarn.ewma.messageAgeLimitSeconds=86400
  270. yarn.ewma.maxUniqueMessages=250
  271. log4j.appender.EWMA=org.apache.hadoop.yarn.util.Log4jWarningErrorMetricsAppender
  272. log4j.appender.EWMA.cleanupInterval=${yarn.ewma.cleanupInterval}
  273. log4j.appender.EWMA.messageAgeLimitSeconds=${yarn.ewma.messageAgeLimitSeconds}
  274. log4j.appender.EWMA.maxUniqueMessages=${yarn.ewma.maxUniqueMessages}
  275. #
  276. # Fair scheduler state dump
  277. #
  278. # Use following logger to dump the state to a separate file
  279. #log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.statedump=DEBUG,FSSTATEDUMP
  280. #log4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.statedump=false
  281. #log4j.appender.FSSTATEDUMP=org.apache.log4j.RollingFileAppender
  282. #log4j.appender.FSSTATEDUMP.File=${hadoop.log.dir}/fairscheduler-statedump.log
  283. #log4j.appender.FSSTATEDUMP.layout=org.apache.log4j.PatternLayout
  284. #log4j.appender.FSSTATEDUMP.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  285. #log4j.appender.FSSTATEDUMP.MaxFileSize=${hadoop.log.maxfilesize}
  286. #log4j.appender.FSSTATEDUMP.MaxBackupIndex=${hadoop.log.maxbackupindex}
  287. # Log levels of third-party libraries
  288. log4j.logger.org.apache.commons.beanutils=WARN