From 6765a868dca665c82a5cccfbf786b3c60b2e4fb5 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Sun, 7 Jan 2024 19:32:36 -0800 Subject: [PATCH] Updated seed logging with more information. --- modules/quant_api/src/EventSubscriber/QuantApi.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/quant_api/src/EventSubscriber/QuantApi.php b/modules/quant_api/src/EventSubscriber/QuantApi.php index 9a0c285f..27c46f98 100644 --- a/modules/quant_api/src/EventSubscriber/QuantApi.php +++ b/modules/quant_api/src/EventSubscriber/QuantApi.php @@ -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; } @@ -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; } @@ -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; } @@ -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; }