From 4d33779ad07a514e10b7b232bfc0f96850ad8d13 Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Thu, 10 Jan 2019 11:52:40 +0800 Subject: [PATCH] fix bug --- src/Providers/ClientServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Providers/ClientServiceProvider.php b/src/Providers/ClientServiceProvider.php index cae79f2..8dd7b0f 100644 --- a/src/Providers/ClientServiceProvider.php +++ b/src/Providers/ClientServiceProvider.php @@ -4,6 +4,7 @@ namespace JsonRpc\Providers; use Illuminate\Support\ServiceProvider; use JsonRpc\Client; +use Monolog\Handler\StreamHandler; use Monolog\Logger; class ClientServiceProvider extends ServiceProvider @@ -19,7 +20,7 @@ class ClientServiceProvider extends ServiceProvider $config = config('rpc.client'); $logger = new Logger('rpc-client-logger'); - $logger->pushHandler($this->app->storagePath()."/logs/rpc_client_".date("Ymd").".log"); + $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); });