qlimix/http-logging-middleware

Logging request and response with PSR-15 middleware

1.0.0 2019-06-23 12:37 UTC

This package is auto-updated.

Last update: 2024-10-24 01:26:47 UTC


README

Travis CI Coveralls Packagist MIT License

Logging request and response with PSR-15 middleware.

Install

Using Composer:

$ composer require qlimix/http-logging-middleware

usage

<?php

use Qlimix\HttpMiddleware\RequestLoggerMiddleware;
use Qlimix\HttpMiddleware\ResponseLoggerMiddleware;

$requestLogger = new FooBarRequestLogger();
$responseLogger = new FooBarResponseLogger();

$requestLoggerMiddleware = new RequestLoggerMiddleware($requestLogger);
$responseLoggerMiddleware = new ResponseLoggerMiddleware($responseLogger);

Testing

To run all unit tests locally with PHPUnit:

$ vendor/bin/phpunit

Quality

To ensure code quality run grumphp which will run all tools:

$ vendor/bin/grumphp run

Contributing

Please see CONTRIBUTING for details.