5

I installed Flume 1.4.0-cdh4.7.0 in CentOS (cloudera VM)

I ran the following command to start the flume

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

but it is only writing the default (INFO) level to the console. Cannot figure out why?

Community
  • 1
  • 1
scott
  • 235
  • 4
  • 12
  • I couldn't find a solution. For now I am changing the log level inside the class to DEBUG level and able to see it in the taskattempt log – scott Dec 03 '14 at 06:01

4 Answers4

5

There is a typo in your command line:

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

It says root.looger in stead of root.logger and so your command line option is overridden by something in the log4j.propeties file

DataHacker
  • 276
  • 2
  • 10
3

The -Dflume.root.logger property overrides the root logger in conf/log4j.properties to use the console appender. If you didn't override the root logger, everything would still work, but the output would be going to a file log/flume.log instead. Of course, you can also just edit the conf/log4j.properties file and change the flume.root.logger property (or anything else you like).

Diego B
  • 1,256
  • 11
  • 19
1

It wont work if flume's bin directory (which contains flume-ng shell) is placed on PATH. You have to start it from flume's root dir, and place inside conf/log4j.properties the desired level for logging, in this case DEBUG. Then and only then it will log into file or console on the desired level.

Serġan
  • 658
  • 5
  • 6
1

You should use this to get debug level info in console.

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

Yuvraj Gupta
  • 2,475
  • 16
  • 26