diff --git a/src/App/Page.php b/src/App/Page.php index 2fb18c4c5d..6470afd6b8 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -22,6 +22,7 @@ use Friendica\Core\Renderer; use Friendica\Core\Session\Model\UserSession; use Friendica\Core\System; use Friendica\Core\Theme; +use Friendica\DI; use Friendica\Network\HTTPException; use Friendica\Util\Images; use Friendica\Util\Network; @@ -102,7 +103,7 @@ class Page implements ArrayAccess $load = number_format(System::currentLoad(), 2); $runtime = number_format(microtime(true) - $this->timestamp, 3); if ($runtime > $config->get('system', 'runtime_loglimit')) { - Logger::debug('Runtime', ['method' => $this->method, 'module' => $this->module, 'runtime' => $runtime, 'load' => $load, 'origin' => $origin, 'signature' => $signature, 'request' => $_SERVER['REQUEST_URI'] ?? '']); + DI::logger()->debug('Runtime', ['method' => $this->method, 'module' => $this->module, 'runtime' => $runtime, 'load' => $load, 'origin' => $origin, 'signature' => $signature, 'request' => $_SERVER['REQUEST_URI'] ?? '']); } } diff --git a/src/BaseModule.php b/src/BaseModule.php index 908f750ba9..8c69fdcce8 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -412,8 +412,8 @@ abstract class BaseModule implements ICanHandleRequests public static function checkFormSecurityTokenRedirectOnError(string $err_redirect, string $typename = '', string $formname = 'form_security_token') { if (!self::checkFormSecurityToken($typename, $formname)) { - Logger::notice('checkFormSecurityToken failed: user ' . DI::userSession()->getLocalUserNickname() . ' - form element ' . $typename); - Logger::debug('checkFormSecurityToken failed', ['request' => $_REQUEST]); + DI::logger()->notice('checkFormSecurityToken failed: user ' . DI::userSession()->getLocalUserNickname() . ' - form element ' . $typename); + DI::logger()->debug('checkFormSecurityToken failed', ['request' => $_REQUEST]); DI::sysmsg()->addNotice(self::getFormSecurityStandardErrorMessage()); DI::baseUrl()->redirect($err_redirect); } @@ -422,8 +422,8 @@ abstract class BaseModule implements ICanHandleRequests public static function checkFormSecurityTokenForbiddenOnError(string $typename = '', string $formname = 'form_security_token') { if (!self::checkFormSecurityToken($typename, $formname)) { - Logger::notice('checkFormSecurityToken failed: user ' . DI::userSession()->getLocalUserNickname() . ' - form element ' . $typename); - Logger::debug('checkFormSecurityToken failed', ['request' => $_REQUEST]); + DI::logger()->notice('checkFormSecurityToken failed: user ' . DI::userSession()->getLocalUserNickname() . ' - form element ' . $typename); + DI::logger()->debug('checkFormSecurityToken failed', ['request' => $_REQUEST]); throw new \Friendica\Network\HTTPException\ForbiddenException(); }