Skip to content

Remove Psr\Log, add "Logs" Query Monitor subpanel #493

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 12 commits into from
May 2, 2025
Merged

Conversation

chriszarate
Copy link
Member

@chriszarate chriszarate commented May 2, 2025

  1. Remove Psr\Log. We ran into type hint conflicts when adding this plugin to some internal sites. Those sites used plugins with their own (older and incompatible) version of Psr\Log. Since it's likely that other users might hit this same issue, we will remove this library and provide a small implementation of our own.
  2. Fixes a bug (typo) that prevented Query Monitor from working.
  3. Remove wpcomvip_log_to_query_monitor action, since we now log to Query Monitor in our own panel.
  4. Rename wpcomvip_log action to remote_data_blocks_log.
  5. Add an additional "Logs" subpanel to our Query Monitor panel. This ensures that all RDB debugging output goes to our panel, instead of being split across core and custom panels:
Screenshot 2025-05-01 at 18 10 18

Copy link
Contributor

github-actions bot commented May 2, 2025

Test this PR in WordPress Playground.

@alecgeatches
Copy link
Contributor

When testing this, I noticed some repeated warnings on the logger frontend when expanding successful block bindings:

Screenshot 2025-05-02 at 10 50 17 AM

They all seem to be the same warning:

Warning: Undefined array key "block_info" in /var/www/html/wp-content/plugins/remote-data-blocks/inc/Logging/QueryMonitor/RdbBlockBindingOutputHtml.php on line 110 Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/remote-data-blocks/inc/Logging/QueryMonitor/RdbBlockBindingOutputHtml.php on line 110

@chriszarate
Copy link
Member Author

They all seem to be the same warning:

Warning: Undefined array key "block_info" in /var/www/html/wp-content/plugins/remote-data-blocks/inc/Logging/QueryMonitor/RdbBlockBindingOutputHtml.php on line 110 Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/remote-data-blocks/inc/Logging/QueryMonitor/RdbBlockBindingOutputHtml.php on line 110

@alecgeatches Thanks, fixed in 6dec67b

Copy link
Contributor

@alecgeatches alecgeatches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looking good!

@chriszarate chriszarate merged commit 0a85d94 into trunk May 2, 2025
13 checks passed
@chriszarate chriszarate deleted the remote/psr-log branch May 2, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants