vmorozov/laravel-http-client-requests-logger

Package for fast setup for requests and responses logging for laravel http-client-based api clients

v1.0.4 2025-05-15 17:45 UTC

This package is auto-updated.

Last update: 2025-05-15 17:47:46 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.