-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Include milliseconds in pip log timestamps #6587
Comments
Makes sense. This should be easy to fix, by added pip/src/pip/_internal/utils/logging.py Line 132 in 9c8b2ea
This issue is a good starting point for anyone who wants to start working on pip -- it's simple and the process of fixing this should be a good introduction to pip's development workflow. |
(#6142 is the correct link.) |
@pradyunsg, |
https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior It is documented. :/ |
Fixed. Thanks @cjerdonek! :) |
That is |
If this is going to make things messy, do we really need for this feature to be available in 2.7? |
+1 on implementing it "where available" (and if that means "not in 2.7" then so be it). |
Whoops! My bad. Thanks for flagging that. (on mobile) I don't know if this is a py2/py3 is an issue here, since formatTime uses time in both versions. That said, it shouldn't be difficult to add a formatTime method to our formatter, that does use datetime. There's also Basically, if we want to, this is definitely do-able. Almost any approach we take likely work IMO so let's defer discussion until we see a PR for this functionality. |
What's the problem this feature will solve?
Currently (pip 19.1.1) when running
pip install --log example.log ...
, the log messages traced intoexample.log
have timestamps that includes up to the second. For example:As a result:
pip
many times as part of integration tests for e.g. build backends or dev toolsDescribe the solution you'd like
It would be great if pip could include milliseconds in the log timestamps.
Alternative Solutions
Create a
./sitecustomize.py
containingthen execute
pip
likePYTHONPATH=$PWD pip install --log example.log ...
, which results inThis isn't really a good approach since it uses pip implementation details.
The actual implementation could be to define
default_time_format = '%Y-%m-%dT%H:%M:%S'
anddefault_msec_format = '%s,%03d '
onIndentingFormatter
.Additional context
N/A
The text was updated successfully, but these errors were encountered: