edr/http-logging-client

Logs to a PSR3-compliant logger when requests/responses are sent through an httplug HTTP client

Maintainers

Package info

github.com/edigitalresearch/http-logging-client

pkg:composer/edr/http-logging-client

Statistics

Installs: 52

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2016-08-25 09:22 UTC

This package is not auto-updated.

Last update: 2026-03-15 03:50:54 UTC


README

An HTTPlug client that logs to a PSR3 logger.

This performs the same function as the HTTPlug plugin. This can be used as an alternative if you need more control of the logging options.

Example usage with Guzzle and Monolog:

$client = new \edr\LoggingHttpClient\LoggingHttpClient(
    new \Http\Adapter\Guzzle6\Client(new \GuzzleHttp\Client()),
    new \Monolog\Logger('debug', new \Monolog\Handler\StreamHandler('/tmp/debug.log')),
    new \edr\LoggingHttpClient\DiactorosFormatter()
);

$client->sendRequest( ... );