V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
diveIntoWork
V2EX  ›  程序员

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

  •  
  •   diveIntoWork · 2017-09-10 19:11:16 +08:00 · 4184 次点击
    这是一个创建于 2649 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 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

    2 条回复    2017-09-11 09:03:39 +08:00
    Allianzcortex
        1
    Allianzcortex  
       2017-09-10 22:11:31 +08:00 via iPhone
    在 streaming 交流生看见这个问题了😂😂
    diveIntoWork
        2
    diveIntoWork  
    OP
       2017-09-11 09:03:39 +08:00
    @Allianzcortex 😯,喜闻乐见
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5296 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 06:31 · PVG 14:31 · LAX 22:31 · JFK 01:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.