2
votes

We are running a Flink(1.9.1) application on AWS-EMR(5.29) using yarn. We are using a common logging adaptor throughout all the components(including the Flink application) in our project and it uses Log4j2.

From the documentation, I see that there are 3 configuration files.

  1. log4j.properties

  2. log4j-yarn-session.properties

  3. log4j-cli.properties

I understand that I will have to modify log4j.properties for the job manager and task manager logs and log4j-cli.properties for the code not included in the cluster code. Now given this situation,

  1. How do I pass my log4j2.properties?

  2. Do we replace the logging jars in the lib folder with log4j2 jars?

1

1 Answers

0
votes

Not a solid solution but this is a workaround. If the log4j.properties file in the /conf folder is deleted, the log4j2 file within the jar that is within the classpath is referred. But be careful when you have multiple jars in the classpath with the log4j2 properties file.