This commit is contained in:
dongwei 2019-01-10 14:17:45 +08:00
parent d903ae3284
commit 42c37e780d

View File

@ -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) {