Skip to content
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

[DevTools] Global console log #21890

Closed
bvaughn opened this issue Jul 15, 2021 · 2 comments
Closed

[DevTools] Global console log #21890

bvaughn opened this issue Jul 15, 2021 · 2 comments
Labels
Component: Developer Tools Resolution: Stale Automatically closed due to inactivity

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Jul 15, 2021

Builds on top of #21889.

Console logs are currently scattered and confusing (e.g. double rendering may show logs twice, logs printed before a component suspends may appear to be truncated unexpected and then later printed again when retrying). Overall the sequence of logs in the console can be confusing.

The DevTools backend should collect logs during render (and double render) store them until commit. Then it should ordered semantically (by components position within the tree), de-duplicate them (to remove double renders or Suspended/interrupted renders), and send them to the front-end along with metadata about the commit (e.g. commit priority).

The front-end could print these in a new Log view. Each commit could be grouped (with diver lines between). Clicking on a log in the console could select the component that logged it in the tree (if it's still mounted).

Note that objects logged should not be retained but should be stringified to avoid causing memory leaks. (As a result, de-duplication may not perfectly match browser behavior.) Sending logs to the front-end will most likely require adding new information to the serialized tree update that gets sent after each commit.

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2022
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Developer Tools Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

No branches or pull requests

1 participant