qlimix / logging-http-logger
Logging PSR-7 http requests
2.0.0
2020-11-21 19:51 UTC
Requires
- php: >7.4
- psr/http-message: ^1.0
- qlimix/logging: ^3.0
Requires (Dev)
- qlimix/code-standard: ^3.0
This package is auto-updated.
Last update: 2024-10-22 04:56:07 UTC
README
Logging PSR-7 http requests.
Install
Using Composer:
$ composer require qlimix/logging-http-logger
usage
Logging requests:
<?php use Qlimix\Log\Logger\Request\PSRRequestLogger; $logHandler = new FooBarLogHandler(); $requestLogger = new PSRRequestLogger($logHandler); $requestLogger->log(new Request());
Logging responses:
<?php use Qlimix\Log\Logger\Response\PSRResponseLogger; $logHandler = new FooBarLogHandler(); $responseLogger = new PSRResponseLogger($logHandler); $responseLogger->log(new Request());
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.