gokure / hyperf-http-logger
Log HTTP requests and responses for Hyperf.
v3.1.0
2023-12-13 08:00 UTC
Requires
- php: >=8.0
- hyperf/di: ~3.0.0 || ~3.1.0
- hyperf/http-server: ~3.0.0 || ~3.1.0
- hyperf/logger: ~3.0.0 || ~3.1.0
Requires (Dev)
- hyperf/testing: ~3.0.0 || ~3.1.0
- mockery/mockery: ^1.5
README
A middleware which can log incoming requests and responses to the log.
Installation
Require the gokure/hypref-http-logger
package in your composer.json
and update your dependencies:
composer require gokure/hypref-http-logger
Optionally you can publish the configuration file with:
php bin/hyperf.php vendor:publish gokure/hypref-http-logger
Usage
To allow HTTP Logger in your application, add the HttpLoggerMiddleware
middleware at the top of the property of config/autoload/middlewares.php
file in the config (see Configuration below):
'http' => [ \Gokure\HttpLogger\HttpLoggerMiddleware::class, ... ],
License
Released under the MIT License, see LICENSE.