ageekdev / vapor-http-logger
此包可以将Laravel Vapor应用程序的入站请求记录到云监控中。
v1.1.0
2024-04-07 14:25 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0|^10.0|^11.0
Requires (Dev)
- larastan/larastan: ^2.4.1
- laravel/pint: ^1.10
- orchestra/testbench: ^7.31|^8.11|^9.0
- pestphp/pest: ^1.0|^2.0
- pestphp/pest-plugin-laravel: ^1.4|^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- roave/security-advisories: dev-latest
README
在Laravel Vapor应用程序中记录HTTP请求
安装
您可以通过composer安装此包
composer require ageekdev/vapor-http-logger
您可以使用以下命令发布配置文件
php artisan vendor:publish --provider="AgeekDev\HttpLogger\HttpLoggerServiceProvider" --tag="config"
这是发布配置文件的内容
return [ /* * Automatic registration of middleware will only happen if this setting is `true` */ 'enabled' => env('HTTP_LOGGER_ENABLED', true), /* * The log profile which determines whether a request should be logged. * It should implement `LogProfile`. */ 'log_profile' => \AgeekDev\HttpLogger\LogNonGetRequests::class, /* * The log writer used to write the request to a log. * It should implement `LogWriter`. */ 'log_writer' => \AgeekDev\HttpLogger\DefaultLogWriter::class, /* * The log channel used to write the request. */ 'log_channel' => env('LOG_CHANNEL', 'stderr'), /* * The log level used to log the request. */ 'log_level' => 'info', /* * List of request methods that will be logged. */ 'request_methods' => ['post', 'put', 'patch', 'delete'], /* * Filter out body fields which will never be logged. */ 'except' => [ 'password', 'password_confirmation', ], /* * List of headers that will be sanitized. For example Authorization, Cookie, Set-Cookie... */ 'sanitize_headers' => [], ];
测试
composer test
变更日志
有关最近更改的更多信息,请参阅 CHANGELOG
贡献
有关详细信息,请参阅 CONTRIBUTING
安全漏洞
请查看 我们的安全策略 了解如何报告安全漏洞。
鸣谢
此包包含从 Log HTTP requests 复制的代码
许可协议
MIT许可协议(MIT)。有关更多信息,请参阅 许可文件