-
Notifications
You must be signed in to change notification settings - Fork 2k
Improve exception logging #5684
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
Improve exception logging #5684
Conversation
364ac02 to
8cee710
Compare
8cee710 to
491e505
Compare
491e505 to
d80309e
Compare
|
Why this PR is refactoring? |
Changed title. |
|
Before: After: |
|
|
||
| unset($frame['line']); | ||
| $idx = $index; | ||
| $idx = str_pad((string) ++$idx, 2, ' ', STR_PAD_LEFT); |
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.
Why do you start with 1, not 0?
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.
I feel that's more "natural" way of counting. No offense to zero-based array counting. 😂
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.
$idx = str_pad((string) ++$idx, 2, '#', STR_PAD_LEFT);This is like the original.
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 is like the original.
This would fail on idx >= 10. https://3v4l.org/DAqmo
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.
echo '#'.str_pad(++$idx, 3, ' ', STR_PAD_RIGHT).'Some more text', PHP_EOL;
|
@paulbalandan The log format will be changed. If a user watches log files and parse it to check the error, it may break. |
d80309e to
825534e
Compare
Description
Closes #5677
Checklist: