hive-log4j2.properties 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. status = INFO
  17. name = HiveLog4j2
  18. packages = org.apache.hadoop.hive.ql.log
  19. # list of properties
  20. property.hive.log.level = INFO
  21. property.hive.root.logger = DRFA
  22. property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
  23. property.hive.log.file = hive.log
  24. property.hive.perflogger.log.level = INFO
  25. # list of all appenders
  26. appenders = console, DRFA
  27. # console appender
  28. appender.console.type = Console
  29. appender.console.name = console
  30. appender.console.target = SYSTEM_ERR
  31. appender.console.layout.type = PatternLayout
  32. appender.console.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n
  33. # daily rolling file appender
  34. appender.DRFA.type = RollingRandomAccessFile
  35. appender.DRFA.name = DRFA
  36. appender.DRFA.fileName = ${sys:hive.log.dir}/${sys:hive.log.file}
  37. # Use %pid in the filePattern to append <process-id>@<host-name> to the filename if you want separate log files for different CLI session
  38. appender.DRFA.filePattern = ${sys:hive.log.dir}/${sys:hive.log.file}.%d{yyyy-MM-dd}
  39. appender.DRFA.layout.type = PatternLayout
  40. appender.DRFA.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n
  41. appender.DRFA.policies.type = Policies
  42. appender.DRFA.policies.time.type = TimeBasedTriggeringPolicy
  43. appender.DRFA.policies.time.interval = 1
  44. appender.DRFA.policies.time.modulate = true
  45. appender.DRFA.strategy.type = DefaultRolloverStrategy
  46. appender.DRFA.strategy.max = 30
  47. # list of all loggers
  48. loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, PerfLogger
  49. logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
  50. logger.NIOServerCnxn.level = WARN
  51. logger.ClientCnxnSocketNIO.name = org.apache.zookeeper.ClientCnxnSocketNIO
  52. logger.ClientCnxnSocketNIO.level = WARN
  53. logger.DataNucleus.name = DataNucleus
  54. logger.DataNucleus.level = ERROR
  55. logger.Datastore.name = Datastore
  56. logger.Datastore.level = ERROR
  57. logger.JPOX.name = JPOX
  58. logger.JPOX.level = ERROR
  59. logger.PerfLogger.name = org.apache.hadoop.hive.ql.log.PerfLogger
  60. logger.PerfLogger.level = ${sys:hive.perflogger.log.level}
  61. # root logger
  62. rootLogger.level = ${sys:hive.log.level}
  63. rootLogger.appenderRefs = root
  64. rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}