Skip to content

GIT_PYTHON_TRACE environment variable not work #489

Closed
@alexazhou

Description

@alexazhou

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

Activity

Byron

Byron commented on Jul 18, 2016

@Byron
Member

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.

added this to the v2.0.8 - Bugfixes milestone on Jul 18, 2016
alexazhou

alexazhou commented on Jul 18, 2016

@alexazhou
Author

Thanks , It works.

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

added a commit that references this issue on Jul 18, 2016
nvie

nvie commented on Jul 18, 2016

@nvie
Contributor

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

alexazhou commented on Jul 18, 2016

@alexazhou
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Byron@nvie@alexazhou

        Issue actions

          GIT_PYTHON_TRACE environment variable not work · Issue #489 · gitpython-developers/GitPython