From 43ebb495eb33899affa0c1053a1f2dce0c8e0d3c Mon Sep 17 00:00:00 2001 From: Paul Blacknell Date: Wed, 9 Sep 2020 10:58:55 +0100 Subject: [PATCH] fix: only show restapi results at debug level --- src/RestAPI.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RestAPI.php b/src/RestAPI.php index 0a616dc..7c2dece 100644 --- a/src/RestAPI.php +++ b/src/RestAPI.php @@ -149,6 +149,10 @@ public function processAPI() { if ((int) method_exists($this, $this->endpoint) > 0) { $result = $this->{$this->endpoint}($this->args); + // if not handling debug logs then omits results in INFO + if (!$this->logger->isHandling(\Monolog\Logger::DEBUG)) { + $this->logger->info("API processed", array($this->toObject())); + } $this->logger->debug("API processed", array($this->toObject(), $result)); return $this->response($result['result'], $result['code']);