2017 © Pedro Peláez
 

library http-logging-client

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

image

edr/http-logging-client

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

  • Thursday, August 25, 2016
  • by maru/edr
  • Repository
  • 3 Watchers
  • 0 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

logging-http-client

An HTTPlug client that logs to a PSR3 logger., (*1)

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., (*2)

Example usage with Guzzle and Monolog:, (*3)

$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( ... );

The Versions

25/08 2016

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andy Cook