log4j.properties 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  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,
  14. # software distributed under the License is distributed on an
  15. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. # KIND, either express or implied. See the License for the
  17. # specific language governing permissions and limitations
  18. # under the License.
  19. #
  20. #
  21. #
  22. # ZooKeeper Logging Configuration
  23. #
  24. # Format is "<default threshold> (, <appender>)+
  25. # DEFAULT: console appender only
  26. log4j.rootLogger=INFO, CONSOLE
  27. # Example with rolling log file
  28. #log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
  29. # Example with rolling log file and tracing
  30. #log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
  31. #
  32. # Log INFO level and above messages to the console
  33. #
  34. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  35. log4j.appender.CONSOLE.Threshold=INFO
  36. log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  37. log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p - [%t:%C{1}@%L] - %m%n
  38. #
  39. # Add ROLLINGFILE to rootLogger to get log file output
  40. # Log DEBUG level and above messages to a log file
  41. log4j.appender.ROLLINGFILE=org.apache.log4j.ConsoleAppender
  42. log4j.appender.ROLLINGFILE.Threshold=DEBUG
  43. log4j.appender.ROLLINGFILE.File=bookkeeper.log
  44. log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
  45. log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p - [%t:%C{1}@%L] - %m%n
  46. # Max log file size of 10MB
  47. log4j.appender.ROLLINGFILE.MaxFileSize=10MB
  48. # uncomment the next line to limit number of backup files
  49. #log4j.appender.ROLLINGFILE.MaxBackupIndex=10
  50. #
  51. # Add TRACEFILE to rootLogger to get log file output
  52. # Log DEBUG level and above messages to a log file
  53. log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
  54. log4j.appender.TRACEFILE.Threshold=TRACE
  55. log4j.appender.TRACEFILE.File=bookkeeper_trace.log
  56. log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
  57. ### Notice we are including log4j's NDC here (%x)
  58. log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n