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

Prefix user_log (--log) entries with timestamp #6142

Merged
merged 10 commits into from
Jan 20, 2019
Merged

Prefix user_log (--log) entries with timestamp #6142

merged 10 commits into from
Jan 20, 2019

Conversation

fischman
Copy link
Contributor

Why? Eases post-facto analysis of time spent in different phases of pip operation.

Historical note:
767d11e#diff-b670e3b192038c9ffe810c1a12c0c51fL219
made it so that pip invocations emit zero timestamp information to the log
file. Prior to that each pip invocation's start time was written out (search
that commit's diff for [strftime]).

Result: https://gist.github.com/fischman/f570886219de5c64a3b695300195c70a

Resolves #6141

Why? Eases post-facto analysis of time spent in different phases of pip operation.

Historical note:
767d11e#diff-b670e3b192038c9ffe810c1a12c0c51fL219
made it so that pip invocations emit zero timestamp information to the log
file. Prior to that each pip invocation's start time was written out (search
that commit's diff for [strftime]).

Result: https://gist.github.com/fischman/f570886219de5c64a3b695300195c70a

Resolves #6141
Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Some initial comments.

src/pip/_internal/utils/logging.py Outdated Show resolved Hide resolved
src/pip/_internal/utils/logging.py Outdated Show resolved Hide resolved
tests/unit/test_base_command.py Outdated Show resolved Hide resolved
tests/unit/test_base_command.py Outdated Show resolved Hide resolved
src/pip/_internal/utils/logging.py Outdated Show resolved Hide resolved
@fischman
Copy link
Contributor Author

@cjerdonek thanks for the quick & helpful review :)
Please take another look.

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on the changes. A number of minor follow-up comments.

news/6141.feature Outdated Show resolved Hide resolved
src/pip/_internal/utils/logging.py Show resolved Hide resolved
src/pip/_internal/utils/logging.py Outdated Show resolved Hide resolved
tests/unit/test_base_command.py Outdated Show resolved Hide resolved
tests/unit/test_base_command.py Outdated Show resolved Hide resolved
tests/unit/test_logging.py Outdated Show resolved Hide resolved
tests/unit/test_logging.py Outdated Show resolved Hide resolved
tests/unit/test_logging.py Outdated Show resolved Hide resolved
tests/unit/test_logging.py Outdated Show resolved Hide resolved
tests/unit/test_base_command.py Show resolved Hide resolved
@fischman
Copy link
Contributor Author

@cjerdonek please take another look

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few final comments and then I'm okay with this PR. Thanks for your work, @fischman!

news/6141.feature Outdated Show resolved Hide resolved
src/pip/_internal/utils/logging.py Outdated Show resolved Hide resolved
tests/unit/test_logging.py Outdated Show resolved Hide resolved
@cjerdonek cjerdonek added type: enhancement Improvements to functionality C: logging Information Logging labels Jan 20, 2019
Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again, @fischman. I'll see if this can go into the next release.

@pradyunsg pradyunsg changed the title Time-stamp lines emitted to user_log. Prefix user_log (--log) entries with timestamp Jan 20, 2019
@cjerdonek cjerdonek merged commit 2a90808 into pypa:master Jan 20, 2019
@pradyunsg pradyunsg added this to the 19.0 milestone Jan 20, 2019
@lock
Copy link

lock bot commented May 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 30, 2019
@cjerdonek
Copy link
Member

cjerdonek commented Jun 10, 2019

Issue #6587 was posted to add milliseconds to the display.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: logging Information Logging type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time-stamp lines emitted to user_log.
3 participants