You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by rmetzger <gi...@git.apache.org> on 2014/08/31 15:37:57 UTC
[GitHub] incubator-flink pull request: Respect log4j.properties in LocalEnv...
GitHub user rmetzger opened a pull request:
https://github.com/apache/incubator-flink/pull/106
Respect log4j.properties in LocalEnvironment
...instead of just disabling all logging by default
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rmetzger/incubator-flink log4j
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-flink/pull/106.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #106
----
commit 517881d739e6014518a13c2b69a42318694d0fc0
Author: Robert Metzger <rm...@apache.org>
Date: 2014-08-31T13:35:42Z
Respect log4j.properties in LocalEnvironment instead of just disabling all logging by default
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-flink pull request: Respect log4j.properties in LocalEnv...
Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger closed the pull request at:
https://github.com/apache/incubator-flink/pull/106
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-flink pull request: Respect log4j.properties in LocalEnv...
Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/106#discussion_r16960910
--- Diff: flink-java/src/main/java/org/apache/flink/api/java/LocalEnvironment.java ---
@@ -95,7 +95,9 @@ public boolean isLoggingEnabled() {
}
private void initLogging() {
- LogUtils.initializeDefaultConsoleLogger(logging ? Level.INFO : Level.OFF);
+ if(System.getProperty("log4j.properties") == null) {
+ LogUtils.initializeDefaultConsoleLogger(logging ? Level.INFO : Level.OFF);
--- End diff --
I think that Log4J is reading the properties file if there is one (so it will automatically take the log level from it)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-flink pull request: Respect log4j.properties in LocalEnv...
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/106#discussion_r16960581
--- Diff: flink-java/src/main/java/org/apache/flink/api/java/LocalEnvironment.java ---
@@ -95,7 +95,9 @@ public boolean isLoggingEnabled() {
}
private void initLogging() {
- LogUtils.initializeDefaultConsoleLogger(logging ? Level.INFO : Level.OFF);
+ if(System.getProperty("log4j.properties") == null) {
+ LogUtils.initializeDefaultConsoleLogger(logging ? Level.INFO : Level.OFF);
--- End diff --
Why not take the log level from the `log4j.properties` as well?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-flink pull request: Respect log4j.properties in LocalEnv...
Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the pull request:
https://github.com/apache/incubator-flink/pull/106#issuecomment-54078017
We should probably wait with this pull request until @tillrohrmann has finished the switch over to the new logging framework.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-flink pull request: Respect log4j.properties in LocalEnv...
Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:
https://github.com/apache/incubator-flink/pull/106#issuecomment-54178482
This pull request should be obsolete once #111 has been merged. This pull request requires henceforth that the configuration of the logging framework is done by providing a configuration file. If the configuration file is not provided, then the default settings are used. Currently, logback is chosen as the slf4j binding and logback set the log level to DEBUG by default and prints everything on stdout.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---