From 4964dade7d75f294faba6e277791669691104051 Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Thu, 10 Jan 2019 12:14:35 +0800 Subject: [PATCH] fix bug --- src/Client.php | 3 +-- src/Providers/ClientServiceProvider.php | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Client.php b/src/Client.php index 7a3d1f7..6f9b765 100644 --- a/src/Client.php +++ b/src/Client.php @@ -4,7 +4,6 @@ namespace JsonRpc; use GuzzleHttp\Exception\ServerException; use JsonRpc\Exception\RpcServerException; -use Monolog\Logger; class Client { @@ -16,7 +15,7 @@ class Client */ protected $http; - public function __construct($config, Logger $logger) + public function __construct($config) { $default = [ 'app' => '***', diff --git a/src/Providers/ClientServiceProvider.php b/src/Providers/ClientServiceProvider.php index 8dd7b0f..c76530b 100644 --- a/src/Providers/ClientServiceProvider.php +++ b/src/Providers/ClientServiceProvider.php @@ -19,10 +19,10 @@ class ClientServiceProvider extends ServiceProvider $this->app->configure('rpc'); $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, $logger) { - return new Client($config, $logger); +// $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); }); foreach ($config as $k => $item) {