-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Debug] Swap dumper services at bootstrap #19647
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
Merged
Merged
Conversation
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
This commit fix a bug when using debug function too soon. For example, if you call dump function during kernel::boot() the dump output will be sent to stderr, even in a web context. With this patch, the data collector is used by default, so the dump output is send to the WDT. In a CLI context, if dump is used too soon, the datacollector will buffer it, and release it at the end of the script. So in this case everything will be visible by the end used.
I think you can go one step further and dump the collected bootstrap dumps in the event listener, by forwarding them to the dumper that is injected there. |
It's not easy because I need to add new "features" into the DumpDataCollector. So I propose to merge this one, and I will open a new PR for master with your feature. |
👍 |
Thank you @lyrixx. |
nicolas-grekas
added a commit
that referenced
this pull request
Aug 23, 2016
This PR was merged into the 2.7 branch. Discussion ---------- [Debug] Swap dumper services at bootstrap | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | --- This commit fix a bug when using debug function too soon. For example, if you call dump function during kernel::boot() the dump output will be sent to stderr, even in a web context. With this patch, the data collector is used by default, so the dump output is send to the WDT. In a CLI context, if dump is used too soon, the datacollector will buffer it, and release it at the end of the script. So in this case everything will be visible by the end used. Commits ------- d80589c [Debug] Swap dumper services at bootstrap
This was referenced Sep 2, 2016
Merged
Merged
Merged
nicolas-grekas
added a commit
that referenced
this pull request
Aug 9, 2017
…r wiring (ogizanagi) This PR was merged into the 2.7 branch. Discussion ---------- [DebugBundle] Reword an outdated comment about var dumper wiring | Q | A | ------------- | --- | Branch? | 2.7 <!-- see comment below --> | Bug fix? | no | New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | no | Fixed tickets | N/A <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A This comment is outdated since #19647, as the default config is now the one used all the way through in HTTP mode, while it's overridden in CLI mode by the `DumpListener` on `console.command` event. Commits ------- f876fd9 [DebugBundle] Reword an outdated comment about var dumper wiring
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.
This commit fix a bug when using debug function too soon.
For example, if you call dump function during kernel::boot() the
dump output will be sent to stderr, even in a web context.
With this patch, the data collector is used by default, so the
dump output is send to the WDT. In a CLI context, if dump is used
too soon, the datacollector will buffer it, and release it at the
end of the script. So in this case everything will be visible by the
end used.