Skip to content

Added Logger#81

Merged
njwilson merged 4 commits intoosupython:developfrom
michaeta:logger
Jun 18, 2012
Merged

Added Logger#81
njwilson merged 4 commits intoosupython:developfrom
michaeta:logger

Conversation

@michaeta
Copy link
Copy Markdown
Member

@michaeta michaeta commented Jun 8, 2012

Fixes: #55

Added a standard logger to pip2. The logger is located in APPDATA for Windows and in the user's home directory for Mac and Linux.

Added files:

  • pip2\locations.py
    Has default config parameters for pip2.
  • pip2\log.py
    Sets up the pip2 logger
  • tests\log.py
    Adds onto the pip2 logger so that tests can be easily ran using logged output instead of sys.stdout.

michaeta added 4 commits June 7, 2012 18:44
The former contains default values for where the log file is stored the
ladder contains a setup_logger() function to initialize the logger and
hook into the packaging/distutils2 logger.
pip2 now also logs exceptions with tracebacks
CLI TESTS NEED TO BE UPDATED
Added file: tests\log.py
Wraps around the pip2 logger and adds another handler
so tests can capture CLI output using StringIO.
njwilson added a commit that referenced this pull request Jun 18, 2012
@njwilson njwilson merged commit 4a6cdf2 into osupython:develop Jun 18, 2012
@njwilson
Copy link
Copy Markdown
Member

Merged. You asked me to verify the log file location on a Mac and I did; it appears in ~/.pip2/pip2.log as expected.

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.

Add logger to pip2

2 participants