Refactor dynamic App::getLogger() to static DI::logger()

This commit is contained in:
nupplaPhil 2019-12-15 23:46:55 +01:00
parent 34ba7f441d
commit 44bf0343e2
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90

View File

@ -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()]);
}
}