Re: Configuring logback
Hi How to build a Graph using Flink Gelly from a text file that consists of edge list. regards TR RAO From: "Vishwas Siravara" To: "user" Sent: Tuesday, August 20, 2019 9:17:01 PM Subject: Configuring logback Hi guys, I am using logback for my application logs. I have logback.xml as a part of my fat jar that I submit to flink via command line flink run "...". When I run my application from IDE , the appenders are what I have set in my logback but when I run from command line the appender defaults to the root in the flink installation directory. How can I make sure that my application logs go to the correct appender. Here is my logback.xml file which is available in the classpath. true INFO ACCEPT DENY ${APP_LOG_ROOT}service.log ${APP_LOG_ROOT}Archive/service.%d{-MM-dd_HH}.log.gz %d{-MM-dd_HH:mm:ss.SSS} %p %c | %m%n UTF-8 0 5 ERROR ACCEPT DENY ${APP_LOG_ROOT}service-error.log ${APP_LOG_ROOT}Archive/service-error.%d{-MM-dd_HH}.log.gz %d{-MM-dd_HH:mm:ss.SSS} %p %c %m%n UTF-8 0 5 %d{-MM-dd_HH:mm:ss.SSS} [%thread] %-5level %logger{5} - %m%n UTF-8 Thanks, Vishwas
Re: Configuring logback for my flink job
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 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] > > > [1] > https://github.com/apache/flink/blob/master/flink-dist/src/main/flink-bin/bin/flink#L52 > > Vishwas Siravara 于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 >> >
Re: Configuring logback for my flink job
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] [1] https://github.com/apache/flink/blob/master/flink-dist/src/main/flink-bin/bin/flink#L52 Vishwas Siravara 于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 >