vmorozov / laravel-http-client-requests-logger
Package for fast setup for requests and responses logging for laravel http-client-based api clients
Fund package maintenance!
VMorozov
Requires
- php: ^8.3
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require vmorozov/laravel-http-client-requests-logger
Usage
In class that uses laravel http client in constructor:
use \VMorozov\LaravelHttpClientRequestsLogger\HttpClientRequestsLogger; // ..... public function __construct(private HttpClientRequestsLogger $requestsLogger) { $this->requestsLogger->setApiName('some api name'); }
In class that uses laravel http client in code that sets request options:
Http::withMiddleware($this->requestsLogger->createLoggingMiddleware());
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.