mirror of
https://github.com/friendica/friendica
synced 2025-04-28 02:30:16 +00:00
Log function
implement log() function.
This commit is contained in:
parent
d6d593d724
commit
14fde5dc9b
122 changed files with 1280 additions and 1161 deletions
|
@ -9,6 +9,7 @@ namespace Friendica\Protocol;
|
|||
use DOMDocument;
|
||||
use DOMXPath;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -40,12 +41,12 @@ class Feed {
|
|||
$a = get_app();
|
||||
|
||||
if (!$simulate) {
|
||||
logger("Import Atom/RSS feed '".$contact["name"]."' (Contact ".$contact["id"].") for user ".$importer["uid"], LOGGER_DEBUG);
|
||||
Logger::log("Import Atom/RSS feed '".$contact["name"]."' (Contact ".$contact["id"].") for user ".$importer["uid"], LOGGER_DEBUG);
|
||||
} else {
|
||||
logger("Test Atom/RSS feed", LOGGER_DEBUG);
|
||||
Logger::log("Test Atom/RSS feed", LOGGER_DEBUG);
|
||||
}
|
||||
if (empty($xml)) {
|
||||
logger('XML is empty.', LOGGER_DEBUG);
|
||||
Logger::log('XML is empty.', LOGGER_DEBUG);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -199,7 +200,7 @@ class Feed {
|
|||
$header["contact-id"] = $contact["id"];
|
||||
|
||||
if (!is_object($entries)) {
|
||||
logger("There are no entries in this feed.", LOGGER_DEBUG);
|
||||
Logger::log("There are no entries in this feed.", LOGGER_DEBUG);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -248,7 +249,7 @@ class Feed {
|
|||
$importer["uid"], $item["uri"], Protocol::FEED, Protocol::DFRN];
|
||||
$previous = Item::selectFirst(['id'], $condition);
|
||||
if (DBA::isResult($previous)) {
|
||||
logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$previous["id"], LOGGER_DEBUG);
|
||||
Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$previous["id"], LOGGER_DEBUG);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -423,7 +424,7 @@ class Feed {
|
|||
}
|
||||
|
||||
if (!$simulate) {
|
||||
logger("Stored feed: ".print_r($item, true), LOGGER_DEBUG);
|
||||
Logger::log("Stored feed: ".print_r($item, true), LOGGER_DEBUG);
|
||||
|
||||
$notify = Item::isRemoteSelf($contact, $item);
|
||||
|
||||
|
@ -440,7 +441,7 @@ class Feed {
|
|||
|
||||
$id = Item::insert($item, false, $notify);
|
||||
|
||||
logger("Feed for contact ".$contact["url"]." stored under id ".$id);
|
||||
Logger::log("Feed for contact ".$contact["url"]." stored under id ".$id);
|
||||
} else {
|
||||
$items[] = $item;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue