Add logging to php error log
[MAILPOET-4104]
This commit is contained in:
@ -280,6 +280,9 @@ class API {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function logError(Throwable $e): void {
|
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(), [
|
$this->loggerFactory->getLogger(LoggerFactory::TOPIC_API)->error($e->getMessage(), [
|
||||||
'requestMethod' => $this->requestMethod,
|
'requestMethod' => $this->requestMethod,
|
||||||
'requestData' => $this->requestData,
|
'requestData' => $this->requestData,
|
||||||
|
Reference in New Issue
Block a user