Ramish
Ramish

Reputation: 29

How to change the logging level of single app in a Standalone FLINK cluster


In a standalone flink cluster,there are many apps running in a cluster.

As you know,task manager and all the apps runs on single jvm in standalone mode,how to change the logging level of an app without impacting the other apps log level.

At global level of the task manager the logging level can be changed,but it will change the logging for all the apps running in the cluster,beside it will also need all the task manager restart which is not a great idea at all.

Upvotes: 0

Views: 1710

Answers (1)

Till Rohrmann
Till Rohrmann

Reputation: 13346

In general it is not possible to define different log levels for different jobs running on the same Flink cluster with respect to the cluster classes. The problem is that the cluster classes are shared across all jobs and, thus, use all the same log level. What you can do though, is to define different log levels for your job specific classes by configuring the log4j.properties properly:

log4j.logger.my.app1=DEBUG
log4j.logger.my.app2=WARN
log4j.logger.my.app3=OFF

When using log4j 2, then you can also enable a periodic refresh interval for the log4j.properties file. This feature enables that you can change the properties file and log4j will reconfigure itself wrt to the refresh interval.

Upvotes: 1

Related Questions