Skip to content

Commit

Permalink
Updated seed logging with more information.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Jan 8, 2024
1 parent 8e50dd2 commit 6765a86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/quant_api/src/EventSubscriber/QuantApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function onRedirect(QuantRedirectEvent $event) {
$res = $this->client->sendRedirect($data);
}
catch (\Exception $error) {
$this->logger->error($error->getMessage());
$this->logger->error('Quant onRedirect: ' . $error->getMessage());
return;
}

Expand Down Expand Up @@ -143,7 +143,7 @@ public function onOutput(QuantEvent $event) {
$res = $this->client->send($data);
}
catch (\Exception $error) {
$this->logger->error($error->getMessage());
$this->logger->error('Quant onOutput: ' . $error->getMessage());
return FALSE;
}

Expand Down Expand Up @@ -297,7 +297,7 @@ public function onMedia(QuantFileEvent $event) {
}
catch (\Exception $error) {
if (strpos("MD5 already matches", $error->getMessage()) !== FALSE) {
$this->logger->error($error->getMessage());
$this->logger->error('Quant onMedia: ' . $error->getMessage());
}
return;
}
Expand All @@ -315,8 +315,8 @@ public function onUnpublish(QuantEvent $event) {
}
catch (\Exception $error) {
// Don't log it if it's a 404, since the content is unpublished.
if (strpos($error->getMessage(), '404 Not Found') === FALSE) {
$this->logger->error($error->getMessage());
if (!str_contains($error->getMessage(), '404 Not Found') && !str_contains($error->getMessage(), 'Resource is already unpublished')) {
$this->logger->error('Quant onUnpublish: ' . $error->getMessage());
}
return;
}
Expand Down

0 comments on commit 6765a86

Please sign in to comment.