log4j.properties 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 2012 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. zookeeper.root.logger=INFO, CONSOLE
  20. zookeeper.console.threshold=INFO
  21. zookeeper.log.dir=.
  22. zookeeper.log.file=zookeeper.log
  23. zookeeper.log.threshold=INFO
  24. zookeeper.log.maxfilesize=256MB
  25. zookeeper.log.maxbackupindex=20
  26. zookeeper.tracelog.dir=${zookeeper.log.dir}
  27. zookeeper.tracelog.file=zookeeper_trace.log
  28. log4j.rootLogger=${zookeeper.root.logger}
  29. #
  30. # console
  31. # Add "console" to rootlogger above if you want to use this
  32. #
  33. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  34. log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
  35. log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  36. log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
  37. #
  38. # Add ROLLINGFILE to rootLogger to get log file output
  39. #
  40. log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
  41. log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
  42. log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
  43. log4j.appender.ROLLINGFILE.MaxFileSize=${zookeeper.log.maxfilesize}
  44. log4j.appender.ROLLINGFILE.MaxBackupIndex=${zookeeper.log.maxbackupindex}
  45. log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
  46. log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
  47. #
  48. # Add TRACEFILE to rootLogger to get log file output
  49. # Log TRACE level and above messages to a log file
  50. #
  51. log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
  52. log4j.appender.TRACEFILE.Threshold=TRACE
  53. log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file}
  54. log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
  55. ### Notice we are including log4j's NDC here (%x)
  56. log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n