-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
After #6036, one idea that came up is that right now there isn't any visibility into all the outgoing HTTP requests made by WP-CLI.
Such information could be really useful though for debugging and identifying slow parts of the code base.
Describe the solution you'd like
Some ideas on how the HTTP request logging could be implemented:
- Add new bootstrap step that hooks into the
http_request_optionsCLI hook and thepre_http_requestWP hook (in\WP_CLI\Runner::setup_bootstrap_hooksperhaps?) - The hook would would only print a minimal debug message such as
HTTP POST request to https://....- This would use a dedicated
httpdebug group
- This would use a dedicated
- The full request & response info could optionally be written to a log file (useful for Behat tests)
- How could this be made opt-in?
Reactions are currently unavailable