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

pull/927/head
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
1 changed files with 2 additions and 1 deletions

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