From 5fd6097604cf085715689b7b80ec1c25a01843f0 Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Fri, 18 Jan 2019 14:25:50 +0800 Subject: [PATCH] update readme --- README.md | 5 +++++ src/Client.php | 1 + src/Providers/LoggerServiceProvider.php | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/Providers/LoggerServiceProvider.php diff --git a/README.md b/README.md index 4871865..a1cf728 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ # Paidian PHP RPC +###框架基本信息 + +- 通信协议: HTTP +- 通信框架: GuzzleHttp +- 消息协议: JSON > 该项目使用 composer 来完成加载 diff --git a/src/Client.php b/src/Client.php index 4a84519..46caaef 100644 --- a/src/Client.php +++ b/src/Client.php @@ -124,6 +124,7 @@ class Client try { $body = \GuzzleHttp\json_decode($resp->getBody(), true); + app('log')->info('client call return body', $body); if (isset($body['error']) && isset($body['error']['code']) && isset($body['error']['message'])) { $message = is_array($body['error']['message']) ? json_encode($body['error']['message']) : $body['error']['message']; throw new RpcServerException($message, $body['error']['code']); diff --git a/src/Providers/LoggerServiceProvider.php b/src/Providers/LoggerServiceProvider.php new file mode 100644 index 0000000..61cdbee --- /dev/null +++ b/src/Providers/LoggerServiceProvider.php @@ -0,0 +1,16 @@ +