Skip to content

GIT_PYTHON_TRACE environment variable not work #489

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

Closed
alexazhou opened this issue Jul 18, 2016 · 4 comments
Closed

GIT_PYTHON_TRACE environment variable not work #489

alexazhou opened this issue Jul 18, 2016 · 4 comments

Comments

@alexazhou
Copy link

Hi:

after export GIT_PYTHON_TRACE=full , I run repo.remotes['origin'].pull( ), and I havn't see any output from stdout, is that a bug,or I used it in a wrong way?

how can i get the output like run a git command in a bash like

Alexa$ git pull
remote: Counting objects: 35, done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 35 (delta 20), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (35/35), done.
From https://github.com/WRTX/LicaifanWeb
   92caee9..5491012  master     -> GitHub/master
Updating 5695833..c48b822

Thanks

@Byron
Copy link
Member

Byron commented Jul 18, 2016

I fell for the same issue once. As you can see, the logging module is used to perform all kinds of debug logging. By default, nothing will happen though if logging is not initialised.
It should work if you call the following before running GitPython:

import logging
logging.basicConfig()
logging.root.setLogLevel(logging.INFO)

If that doesn't work for you, please let me know in the comments and I will re-open this issue.

@Byron Byron closed this as completed Jul 18, 2016
@Byron Byron added this to the v2.0.8 - Bugfixes milestone Jul 18, 2016
@alexazhou
Copy link
Author

Thanks , It works.

And as I try the method is logging.root.setLevel(logging.INFO)

nvie added a commit that referenced this issue Jul 18, 2016
This mentions the instructions of what was discussed in #489.
@nvie
Copy link
Contributor

nvie commented Jul 18, 2016

I was bitten by this once, and wanted to fix it back then, but I forgot. So I've done it now anyway, see a5e6676.

@alexazhou
Copy link
Author

Oh man, you are so nice~

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

No branches or pull requests

3 participants