# This affects logging for both user code and Flink log4j.rootLogger=INFO, file
# Uncomment this if you want to _only_ change Flink's logging #log4j.logger.org.apache.flink=INFO
# The following lines keep the log level of common libraries/connectors on # log level INFO. The root logger does not override this. You have to manually # change the log levels here. log4j.logger.akka=INFO log4j.logger.org.apache.kafka=INFO log4j.logger.org.apache.hadoop=INFO log4j.logger.org.apache.zookeeper=INFO
# Log all infos in the given file log4j.appender.file=org.apache.log4j.FileAppender log4j.appender.file.file=${log.file} log4j.appender.file.append=false log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
# Suppress the irrelevant (wrong) warnings from the Netty channel handler log4j.logger.org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, file
# This affects logging for both user code and Flink log4j.rootLogger=INFO, R
# Uncomment this if you want to _only_ change Flink's logging #log4j.logger.org.apache.flink=INFO
# The following lines keep the log level of common libraries/connectors on # log level INFO. The root logger does not override this. You have to manually # change the log levels here. log4j.logger.akka=INFO log4j.logger.org.apache.kafka=INFO log4j.logger.org.apache.hadoop=INFO log4j.logger.org.apache.zookeeper=INFO
# Suppress the irrelevant (wrong) warnings from the Netty channel handler log4j.logger.org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, R
# This affects logging for both user code and Flink log4j.rootLogger=INFO, kafka
# Uncomment this if you want to _only_ change Flink's logging #log4j.logger.org.apache.flink=INFO
# The following lines keep the log level of common libraries/connectors on # log level INFO. The root logger does not override this. You have to manually # change the log levels here. # !!!这里的配置要加上kafka,否则会卡在kafka send!!! log4j.logger.akka=INFO, kafka log4j.logger.org.apache.kafka=INFO, kafka log4j.logger.org.apache.hadoop=INFO, kafka log4j.logger.org.apache.zookeeper=INFO, kafka
# Suppress the irrelevant (wrong) warnings from the Netty channel handler log4j.logger.org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, kafka
# 滚动日志的配置 # This affects logging for both user code and Flink rootLogger.level = DEBUG rootLogger.appenderRef.rolling.ref = RollingFileAppender
# Uncomment this if you want to _only_ change Flink's logging #logger.flink.name = org.apache.flink #logger.flink.level = INFO
# The following lines keep the log level of common libraries/connectors on # log level INFO. The root logger does not override this. You have to manually # change the log levels here. logger.akka.name = akka logger.akka.level = INFO logger.kafka.name= org.apache.kafka logger.kafka.level = INFO logger.hadoop.name = org.apache.hadoop logger.hadoop.level = INFO logger.zookeeper.name = org.apache.zookeeper logger.zookeeper.level = INFO
# Suppress the irrelevant (wrong) warnings from the Netty channel handler logger.netty.name = org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline logger.netty.level = OFF
报错处理
log4j:ERROR Could not find value for key log4j.appender.file
1 2
log4j:ERROR Could notfind value for key log4j.appender.file log4j:ERROR Could not instantiate appender named "file".