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

4

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?

Hortenciahortensa answered 30/11, 2014 at 2:59 Comment(1)
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 logHortenciahortensa
C
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

Contravention answered 15/1, 2015 at 14:38 Comment(0)
M
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).

Mylesmylitta answered 4/3, 2015 at 20:48 Comment(0)
S
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.

Sweatshop answered 20/7, 2015 at 12:18 Comment(0)
S
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

Stonefly answered 21/7, 2015 at 16:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.