Download the PHP package sherifai/clearcut without Composer
On this page you can find all versions of the php package sherifai/clearcut. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sherifai/clearcut
More information about sherifai/clearcut
Files in sherifai/clearcut
Package clearcut
Short Description Laravel package for logging Http request/response in the database
License MIT
Informations about the package clearcut
ClearCut
Laravel package for logging Http requests/responses to database. It provides a middleware that handles request logging and sets a header "X-Request-Id" with a uuid for tracking each request. All logging is done in the background so it won't affect response time.
Features
- Handles Request Logging to Database as a background job
- Provides a UUID for each request for tracking/debugging
- Dumps log table to laravel storage periodically
- Configurable to match or exclude certain requests
Installation
Require the sherifai/clearcut
package in your composer.json
and update your dependencies:
Next publish the configuration. This is an optional step, it contains some configurations that by default logs all requests.
Next generate the migration file:
It will generate the <timestamp>_request_logs_table.php migration.
Usage
To Start logging requests add LogRequests Middleware in Kernel.php
Clearcut then pushes the logging process to a background job.
Configuration
The configuration file config/clearcut.php
conatins values for selectively logging requests. By default ClearCut Logs all requests.
The most important configurations however are
-
'dump_every' => 1000
which specifies the interval for logging requests before dumping the database. -
'storage_disk' => 'local'
which specifies the storage location for the dump file -
'queue_name' => 'clearcut'
which is the default queue for processing log job 'enabled' => true
which determines of the package is working and storing request logs
Contribution
Support follows PSR-2 PHP coding standards.
Please report any issue you find in the issues page. Pull requests are welcome.
License
Released under the MIT License, see LICENSE.