Skip to content

Commit

Permalink
Log any request
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 authored Mar 21, 2024
1 parent a452418 commit 01334e0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Model/LogHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ public function after(
$this->lastLog->setResponseBody($responseBody);
$this->lastLog->setResponseCode($responseCode);
$this->lastLog->setResponseDatetime($responseDateTime);
if ($responseCode === '200') {
$this->logResourceModel->delete($this->lastLog);
} else {
$this->logResourceModel->save($this->lastLog);
}
$this->logResourceModel->save($this->lastLog);
} catch (Exception $exception) {
$this->logger->error(__('Cant complete webapi log save because of error: %1', $exception->getMessage()));
}
Expand Down

0 comments on commit 01334e0

Please sign in to comment.