log4j.properties 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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-1.3.0-SNAPSHOT\\
  21. ambari.log.file=ambari-server.log
  22. ambari.config-changes.file=ambari-config-changes.log
  23. # Define the root logger to the system property "ambari.root.logger".
  24. log4j.rootLogger=${ambari.root.logger}
  25. # Logging Threshold
  26. log4j.threshhold=ALL
  27. #
  28. # Daily Rolling File Appender
  29. #
  30. log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
  31. log4j.appender.DRFA.File=${ambari.log.dir}\${ambari.log.file}
  32. # Rollver at midnight
  33. log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
  34. # 30-day backup
  35. #log4j.appender.DRFA.MaxBackupIndex=30
  36. log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
  37. # Pattern format: Date LogLevel LoggerName LogMessage
  38. log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
  39. # Debugging Pattern format
  40. #log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
  41. #
  42. # console
  43. # Add "console" to rootlogger above if you want to use this
  44. #
  45. log4j.appender.console=org.apache.log4j.ConsoleAppender
  46. log4j.appender.console.target=System.err
  47. log4j.appender.console.layout=org.apache.log4j.PatternLayout
  48. log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
  49. # Log config changes
  50. log4j.logger.configchange=INFO,configchange
  51. log4j.additivity.configchange=false
  52. log4j.appender.configchange=org.apache.log4j.FileAppender
  53. log4j.appender.configchange.File=${ambari.log.dir}\${ambari.config-changes.file}
  54. log4j.appender.configchange.layout=org.apache.log4j.PatternLayout
  55. log4j.appender.configchange.layout.ConversionPattern=%d{ISO8601} %5p - %m%n