Logging issue

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

Logging issue

Philippe Rigaux
Hello there,

I am testing Flink, and I am trying to control the logging messages. I defined a new logback.xml and run my program as:

java -Dlogback.configurationFile=./logback.xml WordCount

However nothing changes, the logback.xml seems just to be ignored. Any idea?

Thanks

Philippe

My file:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%date %n FOOBAR [%thread] %level %logger{35}</pattern>
    </encoder>
  </appender>
  <root level="SEVERE">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>
Reply | Threaded
Open this post in threaded view
|

Re: Logging issue

Stephan Ewen
Hi!

By default, Flink currently uses Log4J, not logback as the logging backend. So to adjust your logging, you need to change the "log4j.properties" file.

The reason why the "logback.xml" file is there is the following: We were planning on using logback, and wanted to make it easy for people to swap the logging backend themselves (by changing libs and startup parameters). So we added the files already. I see how this can create some confusion.

Greetings,
Stephan




On Fri, Dec 19, 2014 at 6:01 PM, Philippe Rigaux <[hidden email]> wrote:
Hello there,

I am testing Flink, and I am trying to control the logging messages. I defined a new logback.xml and run my program as:

java -Dlogback.configurationFile=./logback.xml WordCount

However nothing changes, the logback.xml seems just to be ignored. Any idea?

Thanks

Philippe

My file:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%date %n FOOBAR [%thread] %level %logger{35}</pattern>
    </encoder>
  </appender>
  <root level="SEVERE">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>
Reply | Threaded
Open this post in threaded view
|

Re: Logging issue

Philippe Rigaux
Damned! Thanks for the answer.

Let's continue :-)


2014-12-19 18:29 GMT+01:00 Stephan Ewen <[hidden email]>:
Hi!

By default, Flink currently uses Log4J, not logback as the logging backend. So to adjust your logging, you need to change the "log4j.properties" file.

The reason why the "logback.xml" file is there is the following: We were planning on using logback, and wanted to make it easy for people to swap the logging backend themselves (by changing libs and startup parameters). So we added the files already. I see how this can create some confusion.

Greetings,
Stephan




On Fri, Dec 19, 2014 at 6:01 PM, Philippe Rigaux <[hidden email]> wrote:
Hello there,

I am testing Flink, and I am trying to control the logging messages. I defined a new logback.xml and run my program as:

java -Dlogback.configurationFile=./logback.xml WordCount

However nothing changes, the logback.xml seems just to be ignored. Any idea?

Thanks

Philippe

My file:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%date %n FOOBAR [%thread] %level %logger{35}</pattern>
    </encoder>
  </appender>
  <root level="SEVERE">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>