Log HTTP Requests

Descrição

Log and view all WP HTTP requests

How long do [core / plugin / theme] update checks take to run? What data about my site is being sent out? What about all those ajax requests? The answers to these questions are just a few clicks away.

This plugin logs all WP_HTTP requests and displays them in a table listing for easy viewing. It also stores the runtime of each HTTP request.

Available Hooks

Customize the length (in days) before older log items are removed:

add_filter( 'lhr_expiration_days', function( $days ) {
    return 7; // default = 1
});

Don’t log items from a specific hostname:

add_filter( 'lhr_log_data', function( $data ) {
    if ( false !== strpos( $data['url'], 'wordpress.org' ) ) {
        return false;
    }
    return $data;
});

In the above example, the $data array keys correspond to columns within the lhr_log database table.

Important Links

Instalação

  1. Download and activate the plugin.
  2. Browse to the Log HTTP Requests menu to view log entries.

Avaliações

28 de outubro de 2019
I was looking for a way to look at client's json requests and responses, I was always stuck at "well, I have to be at my client's side at exactly the moment the error occurs, and while I'm also looking at the network tab at the browser". Not anymore! Thanks man, really appreciate this! One point if I may suggest, add a filtering to the log. Either only log URL which contain a "certain phrase", OR log everything and then add a search feature. Either of those would be perfect.
12 de setembro de 2019
This plugin has become indispensable for plugin development particularly debugging API requests. Thank you very much.
5 de junho de 2019
Works exactly as advertised so far. Really helpful for figuring out if any plugins/themes are phoning home unnecessarily. FYI after you've used this plugin to find out who's calling where, you can add "define('WP_HTTP_BLOCK_EXTERNAL', true);" to your wp-config.php to block ANY requests outwards. You'll probably want to also whitelist domains you trust with the WP_ACCESSIBLE_HOSTS parameter. E.g. if you're polling data from instagram or youtube api, and what not. (Credit to Markus Philipp Stefanko for those tips)
3 de setembro de 2018
One of those tools that you're using once a year, but seems to be not replaceable.
Leia todas as 7 avaliações

Contribuidores e desenvolvedores

“Log HTTP Requests” é um software com código aberto. As seguintes pessoas contribuíram para este plugin.

Contribuidores

Registro de alterações

1.1

  • Added lhr_log_data hook to customize logged data (return FALSE to skip logging)
  • Added lhr_expiration_days hook

1.0.4

  • Minor styling tweak

1.0.3

  • Better visibility for long URLs

1.0.2

  • Minor design tweaks
  • Replaced json_encode with wp_send_json

1.0.1

  • Tested compatibility against WP 4.9.4

1.0.0

  • Initial release