Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flume - flume.root.logger=DEBUG,console only logs INFO level log statements

Tags:

flume

flume-ng

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?

like image 212
scott Avatar asked Nov 30 '14 02:11

scott


3 Answers

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

like image 158
DataHacker Avatar answered Sep 20 '22 00:09

DataHacker


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).

like image 45
Diego B Avatar answered Sep 20 '22 00:09

Diego B


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.

like image 28
Serġan Avatar answered Sep 20 '22 00:09

Serġan