malvik-lab/laravel-http-logger
Composer 安装命令:
composer require malvik-lab/laravel-http-logger
包简介
Log every request and response of Laravel PHP Framework.
README 文档
README
Log every request and response of Laravel PHP Framework.
The package saves all the data of the requests and responses in the "request_log" table, but if you want you can use a custom adapter.
Installation
$ composer require malvik-lab/laravel-http-logger
Publish config file
$ php artisan vendor:publish --tag=malviklab-laravel-http-logger-config
Publish migration file
$ php artisan vendor:publish --tag=malviklab-laravel-http-logger-migrations
Run migration
$ php artisan migrate
(Recommended) Use on Global Middleware
// app/Http/Kernel.php protected $middleware = [ \MalvikLab\LaravelHttpLogger\Http\Middleware\LaravelHttpLoggerMiddleware::class, // ... ];
(Alternative) Use on your routes
Route::middleware(['malviklab-laravel-http-logger'])->group(function () { // your routes here });
Configuration
In the configuration file you can set any values present in the requests and responses to be hidden (eg password or access token), the word with which to hide and the adapter to be used for saving.
<?php // config/malviklab-laravel-http-logger.php return [ 'storageAdapter' => MalvikLab\LaravelHttpLogger\Http\Middleware\Adapters\DbAdapter::class, 'hiddenText' => '[ *** HIDDEN *** ]', 'keysToHide' => [ 'Authorization', 'password', 'token', ], ];
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-10