diff --git a/src/Middleware/TunnelMiddleware.php b/src/Middleware/TunnelMiddleware.php index 2c0ffb8..1341f26 100644 --- a/src/Middleware/TunnelMiddleware.php +++ b/src/Middleware/TunnelMiddleware.php @@ -39,6 +39,7 @@ class TunnelMiddleware { //过滤tool返回结果 if ($response instanceof JsonResponse) { + app('rpc.logger')->info('record to influxdb', [app()->environment('dev', 'production')]); if (app()->environment('dev', 'production')) { app('rpc.logger')->info('record to influxdb'); $content = $response->getOriginalContent(); diff --git a/src/Providers/LumenServerServiceProvider.php b/src/Providers/LumenServerServiceProvider.php index a247938..a6625a5 100644 --- a/src/Providers/LumenServerServiceProvider.php +++ b/src/Providers/LumenServerServiceProvider.php @@ -26,7 +26,7 @@ class LumenServerServiceProvider extends BaseServiceProvider public function boot() { parent::boot(); -// $this->app->middleware(TunnelMiddleware::class); + $this->app->middleware(TunnelMiddleware::class); $this->app->routeMiddleware(['rpc.security' => Security::class]); $this->app->router->group([ 'prefix' => 'rpc',