Download the PHP package robmellett/http-logging without Composer
On this page you can find all versions of the php package robmellett/http-logging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download robmellett/http-logging
More information about robmellett/http-logging
Files in robmellett/http-logging
Package http-logging
Short Description A small lightweight package to log all Guzzle http request and responses.
License MIT
Homepage https://github.com/robmellett/http-logging
Informations about the package http-logging
Laravel HTTP Logging Middleware
A small lightweight package to log all Guzzle http request and responses.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
You can add this middleware to the Laravel Http Client or Guzzle in the following way.
You can configure the Log Formatter by adding the following to the Laravel logging config file.
Which will send the following http request/response info to the logs.
A Http Request
A Http Response
Secure Json Formatter
By default, we will attempt to flatten the Laravel config/services.php
array and find any keys that contain the words key
, secret
, password
, hash
, token
and exclude them from the logs.
You can disable this functionality by setting the secure_json_formatter.extract_service_secrets
config option to false
.
You can optionally add your own keys to the secure_json_formatter.secrets
config option.
You can optionally add your own regular expressions to the secure_json_formatter.regexes
config option.
Note: If you are using Laravel 9x, you need to use the LegacySecureJsonFormatter
class instead.
Testing
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
- Rob Mellett
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of http-logging with dependencies
guzzlehttp/guzzle Version ^7.7
illuminate/contracts Version ^10.0||^11.0
spatie/laravel-package-tools Version ^1.16