有人配过 hive 的审计日志吗?请教一下

2017-09-10 19:11:16 +08:00
 diveIntoWork

在 log4j.properties 里配的时候不起作用,HiveMetaStore.audit 的信息还是输出到 hive 的日志里,我想单独输出出来,配了 FileAppender,没用。。log4j 内容如下,主要配置的在最后几行

··············································

status = INFO name = HiveLog4j2 packages = org.apache.hadoop.hive.ql.log

## list of properties property.hive.log.level = INFO property.hive.root.logger = DRFA property.hive.log.dir = /Users/jaxon/tools/hive-bin/logs property.hive.log.file = hive.log property.hive.perflogger.log.level = INFO

## list of all appenders appenders = console, DRFA

# console appender appender.console.type = Console appender.console.name = console appender.console.target = SYSTEM_ERR appender.console.layout.type = PatternLayout appender.console.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n

# daily rolling file appender appender.DRFA.type = RollingRandomAccessFile appender.DRFA.name = DRFA appender.DRFA.fileName = ${sys:hive.log.dir}/${sys:hive.log.file} # Use %pid in the filePattern to append <process-id>@<host-name> to the filename if you want separate log files for different CLI session appender.DRFA.filePattern = ${sys:hive.log.dir}/${sys:hive.log.file}.%d{yyyy-MM-dd} appender.DRFA.layout.type = PatternLayout appender.DRFA.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n appender.DRFA.policies.type = Policies appender.DRFA.policies.time.type = TimeBasedTriggeringPolicy appender.DRFA.policies.time.interval = 1 appender.DRFA.policies.time.modulate = true appender.DRFA.strategy.type = DefaultRolloverStrategy appender.DRFA.strategy.max = 30

# list of all loggers loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, PerfLogger

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn logger.NIOServerCnxn.level = WARN

logger.ClientCnxnSocketNIO.name = org.apache.zookeeper.ClientCnxnSocketNIO logger.ClientCnxnSocketNIO.level = WARN

logger.DataNucleus.name = DataNucleus logger.DataNucleus.level = ERROR

logger.Datastore.name = Datastore logger.Datastore.level = ERROR

logger.JPOX.name = JPOX logger.JPOX.level = ERROR

logger.PerfLogger.name = org.apache.hadoop.hive.ql.log.PerfLogger logger.PerfLogger.level = ${sys:hive.perflogger.log.level}

# root logger rootLogger.level = ${sys:hive.log.level} rootLogger.appenderRefs = root rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}

log4j.logger.org.apache.hadoop.hive.metastore.HiveMetaStore.audit=INFO,audit log4j.additivity.org.apache.hadoop.hive.metastore.HiveMetaStore.audit=false log4j.appender.audit=org.apache.log4j.DailyRollingFileAppender log4j.appender.audit.File=${hive.log.dir}/audit.log log4j.appender.audit.Append=false log4j.appender.audit.layout=org.apache.log4j.PatternLayout log4j.appender.audit.layout.ConversionPattern=[%d{yy-MM-dd HH:mm:ss:SSS}][%C-%M] -%m%n log4j.appender.audit.BufferedIO=true log4j.appender.audit.BufferSize=8192 log4j.appender.audit.DatePattern=.yyyy-MM-dd-HH

4175 次点击
所在节点    程序员
2 条回复
Allianzcortex
2017-09-10 22:11:31 +08:00
在 streaming 交流生看见这个问题了😂😂
diveIntoWork
2017-09-11 09:03:39 +08:00
@Allianzcortex 😯,喜闻乐见

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/389590

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX