Replace call for Logger with DI::logger() in randplace addon

This commit is contained in:
Art4 2025-01-24 11:56:09 +00:00
parent d50650b8cf
commit 32a3160445

View file

@ -20,7 +20,6 @@
*/ */
use Friendica\Core\Hook; use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer; use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
@ -40,7 +39,7 @@ function randplace_install()
Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
Logger::notice("installed randplace"); DI::logger()->notice("installed randplace");
} }
function randplace_uninstall() function randplace_uninstall()
@ -50,7 +49,7 @@ function randplace_uninstall()
* *
* Except hooks, they are all unregistered automatically and don't need to be unregistered manually. * Except hooks, they are all unregistered automatically and don't need to be unregistered manually.
*/ */
Logger::notice("removed randplace"); DI::logger()->notice("removed randplace");
} }
function randplace_post_hook(&$item) function randplace_post_hook(&$item)
@ -61,7 +60,7 @@ function randplace_post_hook(&$item)
* - A status post by a profile owner * - A status post by a profile owner
* - The profile owner must have allowed our addon * - The profile owner must have allowed our addon
*/ */
Logger::notice('randplace invoked'); DI::logger()->notice('randplace invoked');
if (!DI::userSession()->getLocalUserId()) { if (!DI::userSession()->getLocalUserId()) {
/* non-zero if this is a logged in user of this system */ /* non-zero if this is a logged in user of this system */