log4j.properties 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 2011 The Apache Software Foundation
  2. #
  3. # Licensed to the Apache Software Foundation (ASF) under one
  4. # or more contributor license agreements. See the NOTICE file
  5. # distributed with this work for additional information
  6. # regarding copyright ownership. The ASF licenses this file
  7. # to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance
  9. # with the License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. # Define some default values that can be overridden by system properties
  19. ambari.root.logger=INFO,DRFA
  20. ambari.log.dir=\\var\\log\\ambari-server\\
  21. ambari.log.file=ambari-server.log
  22. ambari.config-changes.file=ambari-config-changes.log
  23. ambari.alerts.file=ambari-alerts.log
  24. # Define the root logger to the system property "ambari.root.logger".
  25. log4j.rootLogger=${ambari.root.logger}
  26. # Logging Threshold
  27. log4j.threshhold=ALL
  28. #
  29. # Daily Rolling File Appender
  30. #
  31. log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
  32. log4j.appender.DRFA.File=${ambari.log.dir}\${ambari.log.file}
  33. # Rollver at midnight
  34. log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
  35. # 30-day backup
  36. #log4j.appender.DRFA.MaxBackupIndex=30
  37. log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
  38. # Pattern format: Date LogLevel LoggerName LogMessage
  39. log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  40. # Debugging Pattern format
  41. #log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
  42. #
  43. # console
  44. # Add "console" to rootlogger above if you want to use this
  45. #
  46. log4j.appender.console=org.apache.log4j.ConsoleAppender
  47. log4j.appender.console.target=System.err
  48. log4j.appender.console.layout=org.apache.log4j.PatternLayout
  49. log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
  50. # Log config changes
  51. log4j.logger.configchange=INFO,configchange
  52. log4j.additivity.configchange=false
  53. log4j.appender.configchange=org.apache.log4j.FileAppender
  54. log4j.appender.configchange.File=${ambari.log.dir}\${ambari.config-changes.file}
  55. log4j.appender.configchange.layout=org.apache.log4j.PatternLayout
  56. log4j.appender.configchange.layout.ConversionPattern=%d{ISO8601} %5p - %m%n
  57. # Log alert state changes
  58. log4j.logger.alerts=INFO,alerts
  59. log4j.additivity.alerts=false
  60. log4j.appender.alerts=org.apache.log4j.FileAppender
  61. log4j.appender.alerts.File=${ambari.log.dir}\${ambari.alerts.file}
  62. log4j.appender.alerts.layout=org.apache.log4j.PatternLayout
  63. log4j.appender.alerts.layout.ConversionPattern=%d{ISO8601} %m%n