guzzle-cache-middleware icon indicating copy to clipboard operation
guzzle-cache-middleware copied to clipboard

Add support for PSR-3 logger

Open mirfilip opened this issue 8 years ago • 1 comments
trafficstars

Guzzle 6 has a good support for logging. Configuring HTTP client, you can easily log a lot of details.

When this middleware is used, it's impossible to hook into request / response process and log that request / response was cached.

mirfilip avatar Jul 14 '17 13:07 mirfilip

You can use the normal guzzle logger and log the custom header this middleware adds:

...
new MessageFormatter("... CACHE={res_header_X-Kevinrob-Cache}");
...

lazka avatar Jan 17 '20 13:01 lazka