container-log4j.properties 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS,
  10. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. # See the License for the specific language governing permissions and
  12. # limitations under the License. See accompanying LICENSE file.
  13. #
  14. # Define some default values that can be overridden by system properties
  15. hadoop.root.logger=DEBUG,CLA
  16. # Define the root logger to the system property "hadoop.root.logger".
  17. log4j.rootLogger=${hadoop.root.logger}, EventCounter
  18. # Logging Threshold
  19. log4j.threshold=ALL
  20. #
  21. # ContainerLog Appender
  22. #
  23. #Default values
  24. yarn.app.container.log.dir=null
  25. yarn.app.container.log.filesize=100
  26. log4j.appender.CLA=org.apache.hadoop.yarn.ContainerLogAppender
  27. log4j.appender.CLA.containerLogDir=${yarn.app.container.log.dir}
  28. log4j.appender.CLA.totalLogFileSize=${yarn.app.container.log.filesize}
  29. log4j.appender.CLA.layout=org.apache.log4j.PatternLayout
  30. log4j.appender.CLA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c: %m%n
  31. log4j.appender.CRLA=org.apache.hadoop.yarn.ContainerRollingLogAppender
  32. log4j.appender.CRLA.containerLogDir=${yarn.app.container.log.dir}
  33. log4j.appender.CRLA.maximumFileSize=${yarn.app.container.log.filesize}
  34. log4j.appender.CRLA.maxBackupIndex=${yarn.app.container.log.backups}
  35. log4j.appender.CRLA.layout=org.apache.log4j.PatternLayout
  36. log4j.appender.CRLA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c: %m%n
  37. #
  38. # Event Counter Appender
  39. # Sends counts of logging messages at different severity levels to Hadoop Metrics.
  40. #
  41. log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter