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
Add microseconds to error log #9844
Conversation
0e488cb
to
b400aa4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to implement the functionality being discussed on the mailing list correctly, e.g. u
is always 6 digits long, and the args change and the parts of the code being changed seems right.
This PR is properly using u
- https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters
case 'u': length = slprintf(buffer, sizeof(buffer), "%06d", (int) floor(t->us)); break;
Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca>
Not sure if I'm happy with such a solution (option
Shall I mention this change in the thread? It looked like people were a bit annoyed by me last time... |
Just to keep compatibility with the existing log parsers
0d786ae
to
0ec472a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me. Just some minor things to change.
About the name it's probably best to mentioned in the internals thread. Personally I don't mind this name but maybe someone else might suggest something better.
main/main.c
Outdated
#if HAVE_GETTIMEOFDAY | ||
struct timeval tp = {0}; /* For setting microseconds */ | ||
|
||
gettimeofday(&tp, NULL); | ||
error_time = tp.tv_sec; | ||
error_time_usec = tp.tv_usec; | ||
#else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be in the usec condition where this actually matters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks. If you take a look once again, please?
d59a6a3
to
183837d
Compare
183837d
to
5acc28b
Compare
35d6cc5
to
6984054
Compare
As I have just explained on the mailinglist, I don't think we should merge this at all. Your operating system already provides all the functionality to show these microseconds: https://news-web.php.net/php.internals/119046 |
@negram I think that the discussion on internals didn't reach an agreement so this might need an RFC. Are you prepared to do that? If not, we should close this PR. |
No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you. |
It's just a first attempt to complete #9745