From 8d2c77d8a656423771ba53cb6b573e6b52a40a0f Mon Sep 17 00:00:00 2001 From: Stef Liekens Date: Fri, 28 Apr 2023 16:08:29 +0200 Subject: [PATCH] Reverted pre time logic after merge pr 10 --- Plugin/RestApiLog.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugin/RestApiLog.php b/Plugin/RestApiLog.php index 1adb7f7..78fb32e 100644 --- a/Plugin/RestApiLog.php +++ b/Plugin/RestApiLog.php @@ -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( @@ -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; }