alimranahmed / hit-logger
Laravel request and response logger. Highly encouraged from spatie/laravel-http-logger
Installs: 28 697
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- php: ^7.1|^8.0.2
This package is not auto-updated.
Last update: 2024-12-19 05:20:00 UTC
README
A Laravel 5 package for logging http request and response. Usually we find ourself in a situation that our testing team or an API user is claming that they had sent a request and got an unexpected response. This package gives us the opportunity to look back what really was the request to our laravel application and what was actual the response from our application. This makes our life lot easir.
This pakcage provides a Middleware
that can be used wherever you need(e.g. all the request and response, only a single route's requests and responses, only API requests and responses, only web requests and responses etc).
Built this package being highly inspired by spatie/laravel-http-logger which is a nice package to log only the requests.
Installation:
Run the following command in your terminal while you are in the root directory of your project:
composer require alimranahmed/hit-logger
If you want to change the default behavour of the package you can publish and change the config file. Run the following command to publish the config file:
php artisan vendor:publish --provider="AlImranAhmed\HitLogger\HitLoggerServiceProvider" --tag="config"
Usage
This package has a middleware that can be used to log request and response. Register the middleware in your
app/Http/Karnel.php
file as below:
protected $middleware = [ // ... \AlImranAhmed\HitLogger\Middlewares\HitLogger::class, ];
License
The MIT License (MIT)