1.在日志服务器中,通过Log4jAppender将日志发往flume客户端
1.1 在日志服务器应用中导入Flume相关开发包,WEB-INF/lib下
1.2 导入log4j的jar包,配置log4j配置文件log4j.properties,实现发送日志给flume
log4j.rootLogger = info,stdout,flume
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.err
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %m%n
log4j.appender.flume = org.apache.flume.clients.log4jappender.Log4jAppender