From: nupplaPhil Date: Sun, 15 Dec 2019 22:46:55 +0000 (+0100) Subject: Refactor dynamic App::getLogger() to static DI::logger() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=44bf0343e2c01851c44daaa6f3dda09ef3e16a30;p=friendica-addons.git Refactor dynamic App::getLogger() to static DI::logger() --- diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index a5ab2558..7f91c277 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -10,6 +10,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\Hook; +use Friendica\DI; use Friendica\Util\ConfigFileLoader; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; @@ -99,6 +100,6 @@ function phpmailer_emailer_send_prepare(App $a, array &$b) $b['sent'] = $mail->send(); } catch (Exception $e) { - $a->getLogger()->error('PHPMailer error', ['ErrorInfo' => $mail->ErrorInfo, 'code' => $e->getCode(), 'message' => $e->getMessage()]); + DI::logger()->error('PHPMailer error', ['ErrorInfo' => $mail->ErrorInfo, 'code' => $e->getCode(), 'message' => $e->getMessage()]); } }