Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-1086] Replaced jcl with slf4j and log4j with logback. #111

Closed
wants to merge 4 commits into from

Conversation

tillrohrmann
Copy link
Contributor

Replaced the jcl logging interface with slf4j and log4j with logback. Removed also log4j specific code so Flink can easily be executed using a different slf4j binding. This work also standardises the logging configuration which is now exclusively done by specifying a logback.xml configuration file. This file is either put in the classpath (e.g. src/main/resources/) or given via the environment property -Dlogback.configurationFile. If no configuration is provided then the default configuration of logback is used.

Excluded kafkas transitive dependencies: jmxtools and jmxri.

Corrected encoder pattern in logback.xml

Removed explicit logging access. Loggers are now configured by configuration files. Fixed Yarn issue with multiple logging bindings.
@uce
Copy link
Contributor

uce commented Sep 3, 2014

Very nice. I will have a look later, but would already vote to add the small notes from your mailing list thread [1] to the docs and make it part of the PR.

@tillrohrmann
Copy link
Contributor Author

Good point Ufuk. I'll add the information to the docs.

@tillrohrmann
Copy link
Contributor Author

I added the documentation.

@@ -43,6 +42,8 @@ The Apache Flink project depends on and/or bundles the following components
under the Eclipse Public License (v 1.0)

- JUnit (https://junit.org/)
- logback (https://logback.qos.ch)
Copyright (C) 1999-2012, QOS.ch. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that you didn't forget to update this 👍

I'm not sure if the Copyright line is necessary, because you have it in the lower section. And for the name, I think we should have it as LOGBack.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure either. Maybe we should ask our License/Dependency guru @StephanEwen what's the right way to do it.

@uce
Copy link
Contributor

uce commented Sep 4, 2014

Thanks for adding the documentation. :-)

I've checked the configuration files of the tests and bash scripts. I didn't check every single file, where you replaced the log4j logger though, but since everything is compiling and the tests are running, it should be fine (the test that is failing is unrelated to this PR, see FLINK-1077).

+1 to merge. I like the new logging pattern, which now includes the thread:

11:33:11.842 [Nephele Executor Thread 2] INFO  org.apache.flink.runtime.execution.ExecutionStateTransition  - JM: ExecutionState set from RUNNING to FINISHING for task CHAIN DataSource (TextInputFormat (file:/var/folders/3_/h2rwvy1541g0x_m9bjpqnhfc0000gn/T/org.apache.flink.test.example) -> FlatMap (org.apache.flink.example.java.wordcount.WordCount$Tokenizer) -> Combine(SUM(1)) (3/4)

@uce
Copy link
Contributor

uce commented Sep 5, 2014

I'm merging this now.

@asfgit asfgit closed this in 0818850 Sep 5, 2014
@tillrohrmann tillrohrmann deleted the slf4j branch August 19, 2016 12:24
zhijiangW pushed a commit to zhijiangW/flink that referenced this pull request Jul 23, 2019
tzulitai added a commit to tzulitai/flink that referenced this pull request Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants