Re: how to specify the log level?

Posted by Stephan Ewen on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/how-to-specify-the-log-level-tp329p337.html

Hi!

How are you running your programs? Command line, IDE, web interface?


If you run programs from the command line (after building Flink, or downloading a binary version), you should not get any log output, only progress messages. These are not configurable by log, but you can pipe that output away if it bothers you.
For the created log files, the log4j.properties in "conf" defines the logging.


If you run examples or other programs from within the IDE, the system will look for the log4j.properties in the classpath.

Greetings,
Stephan


On Fri, Nov 7, 2014 at 11:48 AM, Attila BernĂ¡th <[hidden email]> wrote:
Dear Stephan,

Assume I stand in the root directory of the incubator-flink repo.

I did not find a log4j.properties file in that directory (I am not
completely sure what you meant, I looked in
flink-quickstart/flink-quickstart-java/src/main/resources
)
Putting an empty file there did not change anything.

The log4j.properties files I have here are:
sudocker@314a9613c340:~/git/incubator-flink$ find -name log4j.properties
./flink-dist/target/flink-0.7-incubating-SNAPSHOT-bin/flink-yarn-0.7-incubating-SNAPSHOT/conf/log4j.properties
./flink-dist/target/flink-0.7-incubating-SNAPSHOT-bin/flink-0.7-incubating-SNAPSHOT/conf/log4j.properties
./flink-dist/target/flink-0.8-incubating-SNAPSHOT-bin/flink-0.8-incubating-SNAPSHOT/conf/log4j.properties
./flink-dist/src/main/flink-bin/conf/log4j.properties

All of these contain something like
log4j.rootLogger=WARN, file

Attila


2014-11-06 18:02 GMT+01:00 Stephan Ewen <[hidden email]>:
> Hi!
>
> If you use the quickstarts, you find a log4j.properties file in
> src/main/resources. If you make this file empty, it will suppress the log
> output.
>
> In general, a log4j.properties file in the classpath if the way to configure
> logging.
>
> Stephan
>
>
> On Thu, Nov 6, 2014 at 5:31 PM, Attila BernĂ¡th <[hidden email]>
> wrote:
>>
>> Dear Developers!
>>
>> I clone the incubator-flink from github and import it as a maven
>> project in my eclipse.
>> I then run some example, like
>> org.apache.flink.spargel.java.examples.SpargelConnectedComponents
>> and I get a lot of log on the console. How to change that?
>> I tried changing some log4j.properties and logback.xml files,
>> according to the documentation, but I did not find the right one.
>> Thanks in advance.
>>
>> Attila
>
>