From af626f5d3a14a365e97dc6437025a0b1da6b42bc Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Wed, 29 Nov 2023 23:51:31 +0100 Subject: [PATCH] Remove logger --- src/Logger.php | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/Logger.php 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; - } -}