How can you store the logs of flume- generated by running flume in debug mode- in a file? -


when run flume using command :

bin/flume-ng agent --conf conf --conf-file flume.conf --name agentname -dflume.root.logger=info,console

it runs listing log data on console. store log data (flume's log data) in file. how do it?

you need make custom build of flume uses log4j2. configure log4j2 use rolling file appender rolls every minute (or whatever latency desire) spooling directory. configure flume use spoolingdirectorysource against spooling directory.

you can't use direct flume appender (such what's in log4j2) log flume because deadlock. can't use log4j1 rolling file appender because has concurrency defect means may write new messages old file , spoolingdirectorysource fails.

i can't remember if tried log4j appender flume setup. appender not have many ways configure , think cause problems if subsequent agent you're trying talk down.

another approach might patch log4j1 , fix concurrency defect (there's variable needs made volatile)

(yes, setting little frustrating!)


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -