【问题标题】:flume - flume.root.logger=DEBUG,console only logs INFO level log statementsflume - flume.root.logger=DEBUG,console 只记录 INFO 级别的日志语句
【发布时间】:2014-11-30 02:59:39
【问题描述】:

我在 CentOS (cloudera VM) 中安装了 Flume 1.4.0-cdh4.7.0

我运行了以下命令来启动水槽

flume-ng agent -n agent-name -c conf -f conf/flume.conf -Dflume.root.looger=DEBUG,console

但它只是将默认 (INFO) 级别写入控制台。不知道为什么?

【问题讨论】:

  • 我找不到解决方案。现在我正在将类内的日志级别更改为调试级别,并能够在任务尝试日志中看到它

标签: flume flume-ng


【解决方案1】:

你的命令行有错别字:

flume-ng agent -n agent-name -c conf -f conf/flume.conf -Dflume.root.looger=DEBUG,console

它说 root.looger 而不是 root.logger,因此您的命令行选项被 log4j.propeties 中的某些内容覆盖文件

【讨论】:

    【解决方案2】:

    -Dflume.root.logger 属性覆盖 conf/log4j.properties 中的根记录器以使用控制台附加程序。如果您没有覆盖根记录器,一切仍然可以工作,但输出将转到文件 log/flume.log 中。当然,您也可以只编辑 conf/log4j.properties 文件并更改 flume.root.logger 属性(或您喜欢的任何其他内容)。

    【讨论】:

      【解决方案3】:

      如果将flume 的bin 目录(包含flume-ng shell)放在PATH 上,它将无法工作。您必须从水槽的根目录启动它,并在 conf/log4j.properties 中放置所需的日志级别,在本例中为 DEBUG。 然后,只有这样,它才会登录到所需级别的文件或控制台。

      【讨论】:

        【解决方案4】:

        您应该使用它在控制台中获取调试级别信息。

        bin/flume-ng agent --conf ./conf/ -f conf/flume.conf -Dflume.root.logger=DEBUG,console -n agent

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2017-01-03
          • 1970-01-01
          相关资源
          最近更新 更多