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

System logger to Slf4J conversion for wordseg package #102

Merged
merged 1 commit into from
Dec 15, 2015

Conversation

dinoboy197
Copy link

Per @J38 in #99 (comment), I'm starting to convert packges one by one from System.out.println and System.err.println into SLF4J statements.

J38 added a commit that referenced this pull request Dec 15, 2015
System logger to Slf4J conversion for wordseg package
@J38 J38 merged commit 56c2509 into stanfordnlp:master Dec 15, 2015
@J38
Copy link
Contributor

J38 commented Dec 15, 2015

Thanks for your help on this! If you make changes to other packages I am happy to review them and then merge them in. I think doing this on a package by package basis makes the most sense. And you can see some of your code changes in release 3.6.0! Thanks again for the help!

@J38
Copy link
Contributor

J38 commented Dec 15, 2015

FYI we've released 3.6.0 which includes slf4j-api.jar and slf4j-simple.jar in the distribution. In the pom.xml though we are omitting slf4j-simple.jar from the dependencies so people can choose whatever logging they want to use for slf4j.

@dinoboy197
Copy link
Author

I think doing this on a package by package basis makes the most sense. And you can see some of your code changes in release 3.6.0! Thanks again for the help!

You're welcome! I'll continue converting on a package by package basis when I have time.

In the pom.xml though we are omitting slf4j-simple.jar from the dependencies so people can choose whatever logging they want to use for slf4j.

Perfect.

@craigryan
Copy link

So grateful you're adding logging. I'm trying out 3.6.0 and the sentiment examples using annotators "tokenize, ssplit, parse, sentiment" and the only output I'm still seeing is "done [10 sec].". Looks to be coming from edu.stanford.nlp.util.Timing:324

public void done() {
System.err.println("done [" + toSecondsString() + " sec].");
}

I'd really appreciate if you could add the 'utils" package to your list of updates as I presume these classes are consumed by other packages that already have logging in place.

thanks!

BTW, if it's any use to anyone either of the following should turn off nlp logging if using the default logger:

    System.setProperty("org.slf4j.simpleLogger.log.edu.stanford.nlp", "error");
    System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "error");

@dinoboy197
Copy link
Author

I'd really appreciate if you could add the 'utils" package to your list of updates as I presume these classes are consumed by other packages that already have logging in place.

I'd be happy to help out where I can. I'd be really interested in your exact use case - perhaps take a look at how you use CoreNLP in your code to see what makes sense.

@craigryan
Copy link

Yep sure Taylor, my opensource project (sourceforge: crgrep) is a search
tool and makes use of various third party libraries depending on the type
of resource being searched. I'm working on adding a new sentiment (mood)
option in order to take text extracted from a resource and filter the
search results by the expected sentiment. So 'crgrep --mood negative
'product' surveys/*' will search all survey files that contain references
to 'product' and express a negative sentiment.

Having spurious output from any third party library appearing in the
results is confusing without any kind of context so I need the search tool
to control the way in which results and errors are reporting in a way that
makes sense.

Craig.

On Fri, Dec 25, 2015 at 2:24 AM, Taylor Raack [email protected]
wrote:

I'd really appreciate if you could add the 'utils" package to your list of
updates as I presume these classes are consumed by other packages that
already have logging in place.

I'd be happy to help out where I can. I'd be really interested in your
exact use case - perhaps take a look at how you use CoreNLP in your code to
see what makes sense.


Reply to this email directly or view it on GitHub
#102 (comment).

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.

3 participants