From f909b69cdc46284ffd2e3a18fdd633070cd81429 Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Fri, 11 Jan 2019 16:27:15 +0800 Subject: [PATCH] defer provider --- src/Client.php | 1 + src/Providers/ClientServiceProvider.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 5016908..b51aa65 100644 --- a/src/Client.php +++ b/src/Client.php @@ -31,6 +31,7 @@ class Client $stream->setFormatter(new $this->config['log_formatter']()); $logger = new Logger('RPC.LOGGER'); $logger->pushHandler($stream); + $logger->info('call client rpc'); $this->id = 0; $this->logger = $logger; } diff --git a/src/Providers/ClientServiceProvider.php b/src/Providers/ClientServiceProvider.php index 43a4906..801f871 100644 --- a/src/Providers/ClientServiceProvider.php +++ b/src/Providers/ClientServiceProvider.php @@ -19,7 +19,6 @@ class ClientServiceProvider extends ServiceProvider public function register() { $this->app->configure('rpc'); - $this->app->log->info("call client service provider log"); $config = config('rpc.client'); $this->app->singleton('rpc', function () use ($config) { @@ -35,6 +34,6 @@ class ClientServiceProvider extends ServiceProvider public function provides() { - return parent::provides(); // TODO: Change the autogenerated stub + return ['rpc']; } } \ No newline at end of file