epigra/httplogger

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (0.3) of this package.

Maintainers

Package info

github.com/epigra/http-logger

pkg:composer/epigra/httplogger

Statistics

Installs: 117

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 0

0.3 2023-09-26 10:00 UTC

This package is auto-updated.

Last update: 2026-01-26 14:47:09 UTC


README

With our special thanks to Spatie and spatie/laravel-http-logger

Installation

You can install the package via composer:

$ composer require epigra/httplogger

Optionally you can publish the configfile with:

php artisan vendor:publish --provider="Epigra\HttpLogger\HttpLoggerServiceProvider" --tag="config" 

in your env file

LOG_REQUESTS=true
LOG_RESPONSES=true

Usage

This packages provides a middleware which can be added as a global middleware or as a single route.

// in `app/Http/Kernel.php`

protected $middleware = [
    // ...
    
    \Epigra\HttpLogger\Middlewares\HttpLogger::class
];
// in a routes file

Route::post('/submit-form', function () {
    //
})->middleware(\Epigra\HttpLogger\Middlewares\HttpLogger::class);

You can use custom channel configuration on your config.php file by adding

    'http-logger' => [
        'driver' => 'daily',
        'path' => storage_path('logs/responses_requests.log'),
    ],

to your channels array.