From ada346f4ef6d92042723417ed4ca824a61921c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Tue, 3 Jan 2023 12:47:01 +0100 Subject: [PATCH] Add logging to php error log [MAILPOET-4104] --- mailpoet/lib/API/JSON/API.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mailpoet/lib/API/JSON/API.php b/mailpoet/lib/API/JSON/API.php index 9af9044542..4d798af3ee 100644 --- a/mailpoet/lib/API/JSON/API.php +++ b/mailpoet/lib/API/JSON/API.php @@ -280,6 +280,9 @@ class API { } private function logError(Throwable $e): void { + // logging to the php log + error_log((string)$e); // phpcs:ignore Squiz.PHP.DiscouragedFunctions + // logging to the MailPoet table $this->loggerFactory->getLogger(LoggerFactory::TOPIC_API)->error($e->getMessage(), [ 'requestMethod' => $this->requestMethod, 'requestData' => $this->requestData,