diff --git a/src/Logger.php b/src/Logger.php deleted file mode 100644 index e5c52b4..0000000 --- a/src/Logger.php +++ /dev/null @@ -1,48 +0,0 @@ -fromHttp(); - } - - public function __construct($url, $response, $title, $options) - { - $this->url = $url; - $this->response = $response; - $this->title = $title; - $this->options = $options; - } - - public function fromHttp() - { - if (is_null($level = $this->level())) { - return $this; - } - Log::{$level}($this->title, array_merge([ - 'url' => $this->url, - 'response' => $this->response->body(), - 'json' => $this->response->json(), - ], $this->options)); - } - - public function level() - { - return in_array($this->response->status(), $this->errors) || false == $this->response['success'] - ? 'error' - : null; - } -}