1.修改flink conf下的log4j.properties
[root@kafka-251 conf]# pwd
/flume/flume/conf
[root@kafka-251 conf]# ls
flume-conf.properties.template flume-env.ps1.template flume-env.sh log4j.properties
vim log4j.properties
flume.root.logger=ERROR,console
2.日志重定向提交
#!/bin/bash
nowtime=`date '+%Y%m%d_%H%M%S'`
nohup /flume/flume/bin/flume-ng agent \
--conf /flume/flume/conf \
--name a1 \
--conf-file /flume/flumeFlu/conf/XXX.properties \
-Dflume.root.looger=ERROR,CONSOLE \
-Dflume.monitoring.type=http \
-Dflume.monitoring.port=8888 \
> /flume/flumeFlu/logs/XXX_$nowtime.log 2>&1 &
本想使用-Dflume.root.looger=ERROR,CONSOLE覆盖conf下的log4j.properties文件中-Dflume.root.looger配置,但是
发现还是读取的/flume/flume/conf/log4j.properties的配置