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 @@ +