flink-on-k8s-operator icon indicating copy to clipboard operation
flink-on-k8s-operator copied to clipboard

Default log4j.properties file not compatible with log4j2

Open mlegore opened this issue 4 years ago • 0 comments

Since flink v1.11, log4j2 is the default logger setup for flink, out of the box, the log4j.properties file that is put into the container from a configmap is incompatible with log4j2, it does not set a rootlogger, which causes the logger to fall back to console logging with log level ERROR.

The log config that is added by default is:

log4j.rootLogger=INFO, console
log4j.logger.akka=INFO
log4j.logger.org.apache.kafka=INFO
log4j.logger.org.apache.hadoop=INFO
log4j.logger.org.apache.zookeeper=INFO
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
log4j.logger.org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, console

mlegore avatar Sep 24 '21 19:09 mlegore