]> git.mxchange.org Git - friendica.git/commitdiff
Replace Logger with $this->logger in all Module classes
authorArt4 <art4@wlabs.de>
Mon, 13 Jan 2025 11:56:22 +0000 (11:56 +0000)
committerArt4 <art4@wlabs.de>
Mon, 13 Jan 2025 11:56:22 +0000 (11:56 +0000)
src/Module/Api/GNUSocial/Statusnet/Conversation.php
src/Module/Search/Index.php

index b30e58f867dd33ebed617cb2aeb8731ad3d02fee..41f101350aca2e696f7ab5c7480696aba4eda5f9 100644 (file)
@@ -7,7 +7,6 @@
 
 namespace Friendica\Module\Api\GNUSocial\Statusnet;
 
-use Friendica\Core\Logger;
 use Friendica\Database\DBA;
 use Friendica\Module\BaseApi;
 use Friendica\DI;
@@ -40,7 +39,7 @@ class Conversation extends BaseApi
                        $id = $this->getRequestValue($request, 'id', 0);
                }
 
-               Logger::info(BaseApi::LOG_PREFIX . '{subaction}', ['module' => 'api', 'action' => 'conversation', 'subaction' => 'show', 'id' => $id]);
+               $this->logger->info(BaseApi::LOG_PREFIX . '{subaction}', ['module' => 'api', 'action' => 'conversation', 'subaction' => 'show', 'id' => $id]);
 
                // try to fetch the item for the local user - or the public item, if there is no local one
                $item = Post::selectFirst(['parent-uri-id'], ['uri-id' => $id]);
index 122b6c569b8937fcbb9e067fea65d964aa57c3e1..eecd1951691aebe923f283d05851b18a2003bbfb 100644 (file)
@@ -15,7 +15,6 @@ use Friendica\Content\Text\HTML;
 use Friendica\Content\Widget;
 use Friendica\Core\Cache\Enum\Duration;
 use Friendica\Core\L10n;
-use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Core\Search;
 use Friendica\Database\DBA;
@@ -134,7 +133,7 @@ class Index extends BaseSearch
                // Don't perform a fulltext or tag search on search results that look like an URL
                // Tags don't look like an URL and the fulltext search does only work with natural words
                if (parse_url($search, PHP_URL_SCHEME) && parse_url($search, PHP_URL_HOST)) {
-                       Logger::info('Skipping tag and fulltext search since the search looks like a URL.', ['q' => $search]);
+                       $this->logger->info('Skipping tag and fulltext search since the search looks like a URL.', ['q' => $search]);
                        DI::sysmsg()->addNotice(DI::l10n()->t('No results.'));
                        return $o;
                }
@@ -159,11 +158,11 @@ class Index extends BaseSearch
                $pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage);
 
                if ($tag) {
-                       Logger::info('Start tag search.', ['q' => $search, 'start' => $pager->getStart(), 'items' => $pager->getItemsPerPage(), 'last' => $last_uriid]);
+                       $this->logger->info('Start tag search.', ['q' => $search, 'start' => $pager->getStart(), 'items' => $pager->getItemsPerPage(), 'last' => $last_uriid]);
                        $uriids = Tag::getURIIdListByTag($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid);
                        $count = Tag::countByTag($search, DI::userSession()->getLocalUserId());
                } else {
-                       Logger::info('Start fulltext search.', ['q' => $search]);
+                       $this->logger->info('Start fulltext search.', ['q' => $search]);
                        $uriids = Post\Content::getURIIdListBySearch($search, DI::userSession()->getLocalUserId(), $pager->getStart(), $pager->getItemsPerPage(), $last_uriid);
                        $count = Post\Content::countBySearch($search, DI::userSession()->getLocalUserId());
                }
@@ -197,7 +196,7 @@ class Index extends BaseSearch
                        '$title' => $title
                ]);
 
-               Logger::info('Start Conversation.', ['q' => $search]);
+               $this->logger->info('Start Conversation.', ['q' => $search]);
 
                $o .= DI::conversation()->render($items, Conversation::MODE_SEARCH, false, false, 'commented', DI::userSession()->getLocalUserId());