Search code examples
flume

flume not picking log4j.properties


I have been working in Flume for a while and faced this problem recently. (BTW, I am currently working on flume-ng 1.3.1)

When we used the flume agent start command as

"flume-ng agent --conf conf --conf-file /usr/lib/flume/conf/Agent.conf --name Agent"

it has to pick up /conf/log4j.properties. But, it is not picking up those details. I wanted to change the root.flume.logger to DEBUT to see the logger.debug messages in /var/log/flume/flume.log, but could not do so.

log4j.properties file has details as below.

flume.root.logger=INFO,LOGFILE
flume.log.dir=/var/log/flume
flume.log.file=flume.log

Could not find any help from net.. Can any one tried and tested it.?


Solution

  • The problem with above thing is, i was expected to be in Flume home directory when running this. So the configurations in conf directory will be considered while running. I gave the full path after --conf and tried. it worked. I have changed the root.flume.logger properties and it worked well. This will be useful for debug purpose as well. The root.flume.logger can be changed to DEBUG,LOGFILE and the log will written with all loggerfactory's debug method comments..

    Thought, it was minor mistake, i hope it gives some one some info about debug and logger..