log4j.properties 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing,
  13. # software distributed under the License is distributed on an
  14. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. # KIND, either express or implied. See the License for the
  16. # specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. # Define some default values that can be overridden by system properties.
  20. #
  21. # For testing, it may also be convenient to specify
  22. # -Dflume.root.logger=DEBUG,console when launching flume.
  23. #flume.root.logger=DEBUG,console
  24. flume.root.logger=INFO,LOGFILE
  25. flume.log.dir=./logs
  26. flume.log.file=flume.log
  27. log4j.logger.org.apache.flume.lifecycle = INFO
  28. log4j.logger.org.jboss = WARN
  29. log4j.logger.org.mortbay = INFO
  30. log4j.logger.org.apache.avro.ipc.NettyTransceiver = WARN
  31. log4j.logger.org.apache.hadoop = INFO
  32. log4j.logger.org.apache.hadoop.hive = ERROR
  33. # Define the root logger to the system property "flume.root.logger".
  34. log4j.rootLogger=${flume.root.logger}
  35. # Stock log4j rolling file appender
  36. # Default log rotation configuration
  37. log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
  38. log4j.appender.LOGFILE.MaxFileSize=100MB
  39. log4j.appender.LOGFILE.MaxBackupIndex=10
  40. log4j.appender.LOGFILE.File=${flume.log.dir}/${flume.log.file}
  41. log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
  42. log4j.appender.LOGFILE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
  43. # Warning: If you enable the following appender it will fill up your disk if you don't have a cleanup job!
  44. # This uses the updated rolling file appender from log4j-extras that supports a reliable time-based rolling policy.
  45. # See http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html
  46. # Add "DAILY" to flume.root.logger above if you want to use this
  47. log4j.appender.DAILY=org.apache.log4j.rolling.RollingFileAppender
  48. log4j.appender.DAILY.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
  49. log4j.appender.DAILY.rollingPolicy.ActiveFileName=${flume.log.dir}/${flume.log.file}
  50. log4j.appender.DAILY.rollingPolicy.FileNamePattern=${flume.log.dir}/${flume.log.file}.%d{yyyy-MM-dd}
  51. log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout
  52. log4j.appender.DAILY.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
  53. # console
  54. # Add "console" to flume.root.logger above if you want to use this
  55. log4j.appender.console=org.apache.log4j.ConsoleAppender
  56. log4j.appender.console.target=System.err
  57. log4j.appender.console.layout=org.apache.log4j.PatternLayout
  58. log4j.appender.console.layout.ConversionPattern=%d (%t) [%p - %l] %m%n