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

Added NullHandlers to all loggers to prevent "No handler" messages #300

Merged
merged 1 commit into from Jun 26, 2015

Conversation

jamescnowell
Copy link

@jamescnowell jamescnowell commented Jun 25, 2015

When the code is run without setting up loggers, the loggers have no
handlers for the emitted messages. The logging module displays:
No handlers could be found for logger "git.cmd" on the
console. By adding a NullHandler (a no-op) the message disappears,
and doesn't affect logging when other handlers are configured.

When the code is run without setting up loggers, the loggers have no
handlers for the emitted messages. The logging module displays:
`No handlers could be found for logger "git.cmd"` on the
console. By adding a NullHandler (a no-op) the message disappears,
and doesn't affect logging when other handlers are configured.
@jamescnowell
Copy link
Author

jamescnowell commented Jun 25, 2015

So I see the CI build ran with Python 2.6. Is there a list of supported Python versions? I can add a NullHandler as described here, but I'm not sure whre you would want that to live: https://docs.python.org/release/2.6/library/logging.html#configuring-logging-for-a-library

Edit: Looks like more stuff failed. I'm working on that too. Also noticed the CI process lists the versions it tests against.

@jamescnowell
Copy link
Author

jamescnowell commented Jun 25, 2015

I'm not able to reproduce the error on my machine in Python 2.7. Also on the CI build, 'FOO' is totally in the exception. I'm not really sure what's supposed to be going on:

GitCommandError: 'Error when fetching: fatal: protocol error: bad line length character: FOO' returned with exit code 2

@Byron Byron merged commit aa0ccea into gitpython-developers:master Jun 26, 2015
@Byron Byron added this to the v1.0.2 - Fixes milestone Jun 26, 2015
@Byron
Copy link
Member

Byron commented Jun 26, 2015

Thanks a for your contribution!

I took the liberty to add the required NullHandler implementation myself. Besides, you are right, the Foo test is entirely unrelated to this PR, and needs additional attention.

@Byron
Copy link
Member

Byron commented Jun 26, 2015

You can watch the development stream on youtube.

GitPython #10 [PR 300 - add logging Null handlers]

thumb

@jamescnowell jamescnowell deleted the loggingNullHandlers branch Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants