From 42c37e780db957cc8304d1e8cfd9c3a49c0c8da6 Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Thu, 10 Jan 2019 14:17:45 +0800 Subject: [PATCH] logger --- src/Providers/ClientServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Providers/ClientServiceProvider.php b/src/Providers/ClientServiceProvider.php index 29a2d35..8dd7b0f 100644 --- a/src/Providers/ClientServiceProvider.php +++ b/src/Providers/ClientServiceProvider.php @@ -21,8 +21,8 @@ class ClientServiceProvider extends ServiceProvider $config = config('rpc.client'); $logger = new Logger('rpc-client-logger'); $logger->pushHandler(new StreamHandler($this->app->storagePath()."/logs/rpc_client_".date("Ymd").".log")); - $this->app->singleton('rpc', function () use ($config) { - return new Client($config); + $this->app->singleton('rpc', function () use ($config, $logger) { + return new Client($config, $logger); }); foreach ($config as $k => $item) {