-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
docs: recommend safer way to disable logging #11269
Merged
Merged
Conversation
This file contains 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
greg0ire
force-pushed
the
fix-batch-processing-docs
branch
from
February 18, 2024 08:53
8dc49bd
to
0331d1f
Compare
derrabus
reviewed
Feb 18, 2024
Comment on lines
25
to
26
For example, with Monolog, you can use ``Logger::popHandler()`` as | ||
many times as necessary to remove all handlers from the logger. |
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.
You can push a NullHandler instead. The advantage of that approach is that you can pop the NullHandler after your heavy operation and the logger should start logging again.
Resetting the middlewares on the configuration object will only work if the connection object hasn't been built from that configuration object yet. Instead, people should find the logger bound to the logging middleware and disable it.
greg0ire
force-pushed
the
fix-batch-processing-docs
branch
from
February 18, 2024 09:45
0331d1f
to
80cae66
Compare
derrabus
approved these changes
Feb 18, 2024
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Feb 21, 2024
* 2.18.x: Fix Static Analysis folder reference (doctrine#11281) docs: recommend safer way to disable logging (doctrine#11269) Remove unused baseline entries Treat '0' as a legitimate trim char
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Feb 21, 2024
* 2.18.x: Fix Static Analysis folder reference (doctrine#11281) docs: recommend safer way to disable logging (doctrine#11269) Remove unused baseline entries Treat '0' as a legitimate trim char
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Feb 21, 2024
* 2.19.x: Fix Static Analysis folder reference (doctrine#11281) docs: recommend safer way to disable logging (doctrine#11269) Remove unused baseline entries Treat '0' as a legitimate trim char Add type field mapper documentation to the sidebar Mark document as orphan Use correction sectionauthor syntax Make docs valid according to guides 0.3.3 (doctrine#11252)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Feb 21, 2024
* 3.1.x: Fix Static Analysis folder reference (doctrine#11281) Remove broken assertion from DateAddFunction and DateSubFunction (doctrine#11243) Account for inversedBy being a non-falsy-string or null Improve static analysis on AttachEntityListenersListener docs: recommend safer way to disable logging (doctrine#11269) Remove unused baseline entries Treat '0' as a legitimate trim char Add type field mapper documentation to the sidebar Mark document as orphan Use correction sectionauthor syntax Remove unused trait [Documentation] Adding link to Postgres upgrade article (doctrine#11257) Validate more variadic parameters (doctrine#11261) Throw if a variadic parameter contains unexpected named arguments (doctrine#11260) Make docs valid according to guides 0.3.3 (doctrine#11252) fix: support array-type arg in QB variadic calls (doctrine#11242)
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.
Resetting the middlewares on the configuration object will only work if the connection object hasn't been built from that configuration object yet. Instead, people should find the logger bound to the logging middleware and disable it.
Note: I think that with Symfony, another solution might be to have this bundle configuration:
Let me know what you think.