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

Convert a small number of stdout / stderr calls to slf4j #99

Closed

Conversation

dinoboy197
Copy link

Based on the decision to switch over to slf4j per @manning , I thought I would put together a small PR to test the slf4j waters with reviewers.

This uses the Logging class (created previously by another contributor) to retrieve an instance of a Logger. If that isn't desired (you'd rather see just Logger logger = LoggerFactory.getLogger(), please let me know and I'll adjust.

@J38
Copy link
Contributor

J38 commented Oct 31, 2015

Hi, first of all thanks for the contribution! We are actually planning on not using that Logger class and just following the standard slf4j pattern referenced here: http://www.slf4j.org/manual.html ; the pattern we're going to follow is in edu.stanford.nlp.classify.SVMLightClassifierFactory as an example. Slowly but surely over time we will be converting everything over to this new logging method. It sounds like you are interested in changing print statements, so let me ponder the best way to move forward! We are planning to release 3.5.3 soon, so I think the plan here is to just convert a few things to test the waters, and then in the next release maybe have more substantial changes. Regarding this specific pull request, one of us should change your work to fit that standard pattern. I'm happy to convert it or you can if you have a chance. Once again, thanks for your interest on helping us make this change!

@dinoboy197
Copy link
Author

We are actually planning on not using that Logger class and just following the standard slf4j pattern referenced here: http://www.slf4j.org/manual.html ; the pattern we're going to follow is in edu.stanford.nlp.classify.SVMLightClassifierFactory as an example.

Perfect! I actually prefer that style too, but i just wasn't sure since this Logging class existed...

PR updated! Let me know if that looks ok.

@dinoboy197 dinoboy197 force-pushed the traack_corenlp_slf4j branch 2 times, most recently from 34e1301 to 82040f1 Compare November 1, 2015 02:24
@dinoboy197
Copy link
Author

@J38 Ping! Just checking back in on this PR.

@J38
Copy link
Contributor

J38 commented Nov 6, 2015

Hi I'll merge this today, it looks great! Thanks again for the help! If you are interested in helping more we'd greatly appreciate it! Our plan is to hold off on any more logging changes until we release 3.5.3 and finalize the logging plans. But if you'd like to convert statements, you could convert a package at a time, and then I'll review what you did and merge it in! Once again thanks for your help and interest in Stanford CoreNLP!

@dinoboy197
Copy link
Author

But if you'd like to convert statements, you could convert a package at a time, and then I'll review what you did and merge it in!

You bet - do you mean just converting System.out.println and System.err.println into corresponding slf4j statements? I'm happy to keep working on that :)

@J38
Copy link
Contributor

J38 commented Nov 6, 2015

Yes I think our first goal should be to change the System.out.println and System.err.println statements, and then eventually change everything else. Thanks again!

@manning
Copy link
Member

manning commented Nov 17, 2015

Thanks. Merged.

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