-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Ability to log extra fields + trigger event when logging #31135
Ability to log extra fields + trigger event when logging #31135
Conversation
$skipEvents = true; | ||
} | ||
|
||
$formattedMessage = $this->interpolate($message, $context); |
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.
interpolation should only happen after the event has been handled. The app might want to change the context before interpolating. move this inside the if ($level >= $minLevel) {
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.
see my comment on the original PR of this event dispatching of log messages.
the performance optimization is obsolete because the formatted message is part of the event which is dispatched in any case.
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.
Any hook listener should redo the interpolation
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.
We'd then need to expose the interpolation method to hook listeners.
I agree with @DeepDiver1975 and would like to move forward and merge this
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.
redoing the interpolation on all listeners will duplicate the calls - not optimal either.
@ownclouders rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
Automated rebase with GitMate.io was successful! 🎉 |
ae05fdc
to
2d5f19d
Compare
Codecov Report
@@ Coverage Diff @@
## master #31135 +/- ##
============================================
+ Coverage 62.6% 62.61% +0.01%
- Complexity 18253 18262 +9
============================================
Files 1145 1145
Lines 68566 68598 +32
Branches 1234 1234
============================================
+ Hits 42925 42955 +30
- Misses 25280 25282 +2
Partials 361 361
Continue to review full report at Codecov.
|
added commit from #31247 |
we need to finish this to avoid discrepancy with stable10 should we get rid of the optimization ? |
IMO remove optimisation - separate PR, target master then backport, like usual. Now we're messing with a forward port and it's going to end in tears. |
c7855de
to
1acfbac
Compare
If a logger supports it like the default logger, additional fields can now be added to the base JSON object.
1acfbac
to
6a11a90
Compare
@DeepDiver1975 @PVince81 - any update? |
blocks forward port of #31623 ([stable10][feature] provide original exception via logging events) |
merging this to move on |
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. |
*port of #31121