Skip to content

Commit 21de50a

Browse files
committed
Fix logger middleware that did not log errors 2/2
1 parent a06e180 commit 21de50a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Middleware/Log.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public function __invoke(Request $request, ConnectionInterface $connection, call
7878
return $resolvedResponse;
7979
}, function($reason) {
8080
if ($reason instanceof \Exception) {
81-
$this->logger->log("Internal server error", ['exception' => $reason]);
81+
$this->logger->log($this->errorLevel, "Internal server error", ['exception' => $reason]);
8282
} else {
83-
$this->logger->log("Unexpected internal server error", ['data' => $reason]);
83+
$this->logger->log($this->errorLevel, "Unexpected internal server error", ['data' => $reason]);
8484
}
8585
return reject($reason);
8686
});

0 commit comments

Comments
 (0)