]> git.mxchange.org Git - friendica.git/commitdiff
Apply suggestions from code review
authorMichael Vogel <icarus@dabo.de>
Mon, 25 Oct 2021 19:27:21 +0000 (21:27 +0200)
committerGitHub <noreply@github.com>
Mon, 25 Oct 2021 19:27:21 +0000 (21:27 +0200)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
mod/pubsub.php
mod/pubsubhubbub.php
src/Protocol/OStatus.php
src/Protocol/Salmon.php
src/Worker/PubSubPublish.php
view/theme/frio/theme.php

index 99e8015f19dec8126145279d30bd0e7cc41e2775..3727bade9ac19786d9d5a259dd7e657c049f9a88 100644 (file)
@@ -107,7 +107,7 @@ function pubsub_post(App $a)
 {
        $xml = Network::postdata();
 
-       Logger::notice('Feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' .  DI::args()->getCommand() . ' with user-agent: ' . $_SERVER['HTTP_USER_AGENT']);
+       Logger::info('Feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' .  DI::args()->getCommand() . ' with user-agent: ' . $_SERVER['HTTP_USER_AGENT']);
        Logger::debug('Data: ' . $xml);
 
        $nick       = ((DI::args()->getArgc() > 1) ? Strings::escapeTags(trim(DI::args()->getArgv()[1])) : '');
@@ -149,7 +149,7 @@ function pubsub_post(App $a)
                hub_post_return();
        }
 
-       Logger::notice('Import item for ' . $nick . ' from ' . $contact['nick'] . ' (' . $contact['id'] . ')');
+       Logger::info('Import item for ' . $nick . ' from ' . $contact['nick'] . ' (' . $contact['id'] . ')');
        $feedhub = '';
        OStatus::import($xml, $importer, $contact, $feedhub);
 
index f985bef63bc1548440465a84e4568794e309b72f..2cc2394c19c42ad5ef8cf37fb4e35aa78df9c784 100644 (file)
@@ -64,7 +64,7 @@ function pubsubhubbub_init(App $a) {
                        throw new \Friendica\Network\HTTPException\NotFoundException();
                }
 
-               Logger::notice("$hub_mode request from " . $_SERVER['REMOTE_ADDR']);
+               Logger::info("$hub_mode request from " . $_SERVER['REMOTE_ADDR']);
 
                if (DI::args()->getArgc() > 1) {
                        // Normally the url should now contain the nick name as last part of the url
index 277644dcc9a01a5d190e25ebebcff3499a32fd33..c40193e1b08e8c356aad6d138d052f802264ae64 100644 (file)
@@ -535,12 +535,12 @@ class OStatus
                                        foreach (self::$itemlist as $item) {
                                                $found = Post::exists(['uid' => $importer["uid"], 'uri' => $item["uri"]]);
                                                if ($found) {
-                                                       Logger::info("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already exists.");
+                                                       Logger::notice("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already exists.");
                                                } elseif ($item['contact-id'] < 0) {
-                                                       Logger::info("Item with uri ".$item["uri"]." is from a blocked contact.");
+                                                       Logger::notice("Item with uri ".$item["uri"]." is from a blocked contact.");
                                                } else {
                                                        $ret = Item::insert($item);
-                                                       Logger::notice("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
+                                                       Logger::info("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
                                                }
                                        }
                                }
index ebb9f1776df46a2bf2caf13eac3d8dd03345aa19..321b913925f5cc120fa658dbf926d0773811abd4 100644 (file)
@@ -46,7 +46,7 @@ class Salmon
        {
                $ret = [];
 
-               Logger::notice('Fetching salmon key for '.$uri);
+               Logger::info('Fetching salmon key for '.$uri);
 
                $arr = Probe::lrdd($uri);
 
@@ -121,7 +121,7 @@ class Salmon
                        return;
                }
 
-               Logger::notice('slapper called for '.$url.'. Data: ' . $slap);
+               Logger::info('slapper called for '.$url.'. Data: ' . $slap);
 
                // create a magic envelope
 
@@ -209,7 +209,7 @@ class Salmon
                        $return_code = $postResult->getReturnCode();
                }
 
-               Logger::notice('slapper for '.$url.' returned ' . $return_code);
+               Logger::info('slapper for '.$url.' returned ' . $return_code);
 
                if (! $return_code) {
                        return -1;
index 4b1c78bf2dee3da2bf0aa1b26316c714be78e21f..49aef00c9f045aca1b594a80a9e678dec09942ba 100644 (file)
@@ -72,7 +72,7 @@ class PubSubPublish
                $ret = $postResult->getReturnCode();
 
                if ($ret >= 200 && $ret <= 299) {
-                       Logger::notice('Successfully pushed to ' . $subscriber['callback_url']);
+                       Logger::info('Successfully pushed to ' . $subscriber['callback_url']);
 
                        PushSubscriber::reset($subscriber['id'], $last_update);
                } else {
index 3ea1e1641ae4c471df669c57898cd8ce942322d3..138bfdc2aac7781d723a83c77899a3e88492b035 100644 (file)
@@ -57,7 +57,7 @@ function frio_install()
        Hook::register('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
        Hook::register('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
 
-       Logger::notice('installed theme frio');
+       Logger::info('installed theme frio');
 }
 
 /**