Apply suggestions from code review

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2021-10-25 21:27:21 +02:00 committed by GitHub
parent 87673fd0c5
commit 81c9d8d479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View 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);

View 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

View 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);
}
}
}

View 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;

View 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 {

View 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');
}
/**