malvik-lab / lumen-request-log-middleware
1.0.3
2021-05-10 19:01 UTC
Requires
- illuminate/http: ^8.0
This package is auto-updated.
Last update: 2024-11-11 02:40:31 UTC
README
Log every request and response of Lumen PHP Framework.
Installation
$ composer require malvik-lab/lumen-request-log-middleware
Registering Middleware
bootstrap/app.php
$app->middleware([ MalvikLab\LumenRequestLogMiddleware::class, ]);
Set REQUEST_LOG_CHANNEL
.env
REQUEST_LOG_CHANNEL="request-log"
Set logging
config/logging.php
return [ 'channels' => [ 'request-log' => [ 'driver' => 'daily', 'path' => storage_path('logs/' . php_sapi_name() . '/requests.log'), 'days' => 30, ], ], ];