Skip to content

Commit

Permalink
fix: only show restapi results at debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
blacknell committed Sep 9, 2020
1 parent 440b25c commit 43ebb49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/RestAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit 43ebb49

Please sign in to comment.