Commit 4d12589b1d243e7059637b85b8f2fc09125dc220
1 parent
625305a1
独立日志
Showing
1 changed file
with
3 additions
and
1 deletions
src/Hris.php
@@ -197,6 +197,8 @@ class Hris | @@ -197,6 +197,8 @@ class Hris | ||
197 | $response = $this->_http->get($url, $data); | 197 | $response = $this->_http->get($url, $data); |
198 | } | 198 | } |
199 | $body = $response->body(); | 199 | $body = $response->body(); |
200 | + $this->log($response->getStatusCode(), 'StatusCode'); | ||
201 | + $this->log($body, 'Body'); | ||
200 | $result = $response->json(true); | 202 | $result = $response->json(true); |
201 | $this->log($result, 'Result'); | 203 | $this->log($result, 'Result'); |
202 | if (!isset($result['code']) || $result['code'] != 200) { | 204 | if (!isset($result['code']) || $result['code'] != 200) { |
@@ -225,7 +227,7 @@ class Hris | @@ -225,7 +227,7 @@ class Hris | ||
225 | if ($this->_debug) { | 227 | if ($this->_debug) { |
226 | $info = is_scalar($info) ? $info : json_encode($info, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); | 228 | $info = is_scalar($info) ? $info : json_encode($info, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); |
227 | $title = $title ? "[{$title}]" : ''; | 229 | $title = $title ? "[{$title}]" : ''; |
228 | - \think\facade\Log::write($title . $info, 'info'); | 230 | + \think\facade\Log::write($title . $info, 'hris'); |
229 | } | 231 | } |
230 | } | 232 | } |
231 | } | 233 | } |