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

Fix logging in interactive mode #731

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

amitbeka
Copy link

Fix some thorny problems with interactive mode logging in rdflib:

  • When importing rdflib from the command line, it opens the loggers for every possible package, which is a very bad practice
  • More over, when using jupyter console and importing anything that imports rdflib somewhere along the chain, all loggers in the system pour their logs. This is because the condition (not hasattr(__main__, '__file__') and sys.stderr.isatty()) is True but it's of course what we want here
  • Another small fix is checking the stderr is a TTY, not stdout which isn't used

@gromgull
Copy link
Member

this looks good! the travis build timed out, I've restarted it.

@joernhees
Copy link
Member

thanks :)

@joernhees joernhees added cleanup enhancement New feature or request labels Apr 12, 2017
@joernhees joernhees added this to the rdflib 5.0.0 milestone Apr 12, 2017
@joernhees joernhees merged commit 4dc15e3 into RDFLib:master Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants