Skip to content

Commit

Permalink
Reverted pre time logic after merge pr 10
Browse files Browse the repository at this point in the history
  • Loading branch information
stefliekens committed Apr 28, 2023
1 parent 3431280 commit 8d2c77d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Plugin/RestApiLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ public function aroundDispatch(
callable $proceed,
HttpRequest $request
) {
$timePre = microtime(true);
$response = $proceed($request);
if ($this->IsEndpointToExclude($request->getRequestUri())) {
return $response;
}

$time_pre = microtime(true);
list($responseStatusCode, $responseBody) = $this->getResponseData($response);

$this->logger->info(sprintf(
Expand All @@ -50,10 +49,11 @@ public function aroundDispatch(
$request->getMethod(),
$request->getRequestUri(),
$responseStatusCode,
microtime(true) - $time_pre,
microtime(true) - $timePre,
$this->parseMessage($request->getContent()),
$this->parseMessage($responseBody)
));

return $response;
}

Expand Down

0 comments on commit 8d2c77d

Please sign in to comment.