Configuring logback for my flink job

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Configuring logback for my flink job

Vishwas Siravara
Hi,
I have a logback for my flink application which is packaged with the application fat jar. However when I submit my job from flink command line tool, I see that logback is set to 
-Dlogback.configurationFile=file:/data/flink-1.7.2/conf/logback.xml from the client log. 

As a result my application log ends up going to the client log. How can I change this behavior . I know a dirty fix is to add my logback config to the logback in 
/data/flink-1.7.2/conf/logback.xml . 

Any other suggestions on how I can have my application log to its configured appenders. 

Thanks,
Vishwas 
Reply | Threaded
Open this post in threaded view
|

Re: Configuring logback for my flink job

Yang Wang
Hi Vishwas,

If you mean to have your application logs to its configured appenders in client, i think you could use your own FLINK_CONF_DIR environment.
Otherwise, we could not update the log4j/logback configuration.[1]



Vishwas Siravara <[hidden email]> 于2019年8月19日周一 下午11:02写道:
Hi,
I have a logback for my flink application which is packaged with the application fat jar. However when I submit my job from flink command line tool, I see that logback is set to 
-Dlogback.configurationFile=file:/data/flink-1.7.2/conf/logback.xml from the client log. 

As a result my application log ends up going to the client log. How can I change this behavior . I know a dirty fix is to add my logback config to the logback in 
/data/flink-1.7.2/conf/logback.xml . 

Any other suggestions on how I can have my application log to its configured appenders. 

Thanks,
Vishwas 
Reply | Threaded
Open this post in threaded view
|

Re: Configuring logback for my flink job

Vishwas Siravara
My logback is a part of my application jar file, do you mean I should externalize it and pass set its location in FLINK_CONF_DIR ? 
like export FLINK_CONF_DIR=/home/was/

where I have logback.xml in /home/was/ ? 

Thanks,
Vishwas 

On Mon, Aug 19, 2019 at 10:31 PM Yang Wang <[hidden email]> wrote:
Hi Vishwas,

If you mean to have your application logs to its configured appenders in client, i think you could use your own FLINK_CONF_DIR environment.
Otherwise, we could not update the log4j/logback configuration.[1]



Vishwas Siravara <[hidden email]> 于2019年8月19日周一 下午11:02写道:
Hi,
I have a logback for my flink application which is packaged with the application fat jar. However when I submit my job from flink command line tool, I see that logback is set to 
-Dlogback.configurationFile=file:/data/flink-1.7.2/conf/logback.xml from the client log. 

As a result my application log ends up going to the client log. How can I change this behavior . I know a dirty fix is to add my logback config to the logback in 
/data/flink-1.7.2/conf/logback.xml . 

Any other suggestions on how I can have my application log to its configured appenders. 

Thanks,
Vishwas