Merged
Conversation
Member
Member
Author
This was referenced Jan 4, 2023
Member
Author
|
Or wait, it may still help if the error was not logged due to a lower log level. |
Member
|
Should also fix (resp. circumvent) #23429 |
330523b to
e0d92cd
Compare
e0d92cd to
6c996ee
Compare
lib/private/Log.php
Outdated
| $level = $context['level'] ?? ILogger::ERROR; | ||
|
|
||
| $minLevel = $this->getLogLevel($context); | ||
| if ($level < $minLevel && !$this->crashReporters->hasReporters()) { |
Member
There was a problem hiding this comment.
$this->crashReporters needs a null check
6c996ee to
ecf0793
Compare
ChristophWurst
approved these changes
Jan 12, 2023
blizzz
approved these changes
Jan 13, 2023
blizzz
reviewed
Jan 13, 2023
Member
blizzz
left a comment
There was a problem hiding this comment.
wondering about #35970 (comment)
…alizing an exception Signed-off-by: Julius Härtl <jus@bitgrid.net>
This will avoid running into a Nesting level too deep error as the encodeArg calls will limit potential recursive calls on the arguments to a nesting level of 5 Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
ecf0793 to
cf1bd0e
Compare
Member
Author
|
/backport 7daa20d to stable25 |
Member
Author
|
/backport 7daa20d to stable24 |
This was referenced Jan 16, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Small improvement to not start serializing an exception during logging if the log level would skip it anyways. Noticed when seeing errors due to
Nesting level too deep - recursive dependency? at /var/www/html/lib/private/Log/ExceptionSerializer.php#215while there was no actual error logged when commenting out the argument cleanupThe second commit avoids such cases by handling the arguments first (which limits to a recursion depth of 5) before iterating over them for filtering for sensitive parameters.
Checklist