Skip to content

update to slf4j, remove DynamicLog #2384

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

Merged
merged 2 commits into from
Jul 10, 2018
Merged

Conversation

chuxi
Copy link
Contributor

@chuxi chuxi commented Jul 10, 2018

What do these changes do?

DynamicLog implementation impact the ray java performance badly. Many string concat in DynamicLog and it is based on log4j 1.2. To decouple from concrete log tool, use slf4j instead.

Here is the first step to complete the whole work. It removed the DynamicLog and keep its original functions by calling System.setProperty() before Ray core log starts. Because it requires to support multi-workers processes logging. To tell apart each worker's log, it requires to set different names for the worker's log.

And in the future, any logging should use parameter instead of string concat.

// the right way
String name = "tom";
logger.info("hello {}", name); 

// wrong way
logger.info("hello " + name);

Related issue number

N/A

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/6598/
Test FAILed.

@chuxi
Copy link
Contributor Author

chuxi commented Jul 10, 2018

anybody can help review the pull request?

@pcmoritz
Copy link
Contributor

@eric-jj @raulchen Can you help review this or suggest somebody for review?

@raulchen
Copy link
Contributor

@pcmoritz we've already reviewed this at antgroup#46.
I think it should be good to merge.
(Actually all PRs from Ant are internally reviewed at ant-tech-alliance/ray repo before pushing to ray-project/ray)

@robertnishihara
Copy link
Collaborator

@raulchen I see, I would strongly consider doing the reviewing on this repository instead. That way we can see the issues/considerations that were discussed.

If the concern is that it would cause too much clutter, I think it's worth it to provide more visibility.

@pcmoritz
Copy link
Contributor

Great, thanks! The changes look good to me too.

@pcmoritz pcmoritz merged commit 450b11f into ray-project:master Jul 10, 2018
@pcmoritz
Copy link
Contributor

(I second @robertnishihara's comment, it will be better for us and the other open source developers to have the reviews here. Also you shouldn't worry about posting half-finished PRs that are still being worked on here, that's completely fine.)

@raulchen
Copy link
Contributor

@robertnishihara @pcmoritz Thanks for the feedback!

The main purpose of our internal reviews is to ensure a baseline of code quality, and avoid people accidentally violating company's open-source policy.

But I agree that it'd be worth it to share what was discussed before with you. That will help you review faster. I think, in the future, we can also link the original PR. Does this sounds good to you?

@chuxi
Copy link
Contributor Author

chuxi commented Jul 10, 2018

Yes. I should also post the pull request in ant-ray. Thanks for reviewing the pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants