GoogleCloudPlatform / flink-on-k8s-operator

[DEPRECATED] Kubernetes operator for managing the lifecycle of Apache Flink and Beam applications.
Apache License 2.0
658 stars 266 forks source link

Default log4j.properties file not compatible with log4j2 #472

Open mlegore opened 2 years ago

mlegore commented 2 years ago

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