server logger

This commit is contained in:
dongwei 2019-01-19 16:59:19 +08:00
parent c388c4d845
commit ffca2c303b

View File

@ -65,7 +65,7 @@ class JsonRpcServer
app('rpc.logger')->info('server', [$id, $class,$method, $params, $this->request->header('client_app'), $this->request->header('client_addr'), $this->request->header('client_host')]); app('rpc.logger')->info('server', [$id, $class,$method, $params, $this->request->header('client_app'), $this->request->header('client_addr'), $this->request->header('client_host')]);
$ret = call_user_func_array([(new $class($id, $this->request)), $function], $params); $ret = call_user_func_array([(new $class($id, $this->request)), $function], $params);
app('rpc.logger')->info('server_result', [$id, $ret]); app('rpc.logger')->info('server_result', [$id, \GuzzleHttp\json_decode($ret, true)]);
return $ret; return $ret;
} catch (\InvalidArgumentException $e) { } catch (\InvalidArgumentException $e) {