Logger Levels

update logger levels in calls
This commit is contained in:
Adam Magness 2018-10-30 09:58:45 -04:00
parent 91ef9f238c
commit 50da89d861
86 changed files with 673 additions and 673 deletions

View file

@ -23,7 +23,7 @@ class APDelivery extends BaseObject
*/
public static function execute($cmd, $item_id, $inbox, $uid)
{
Logger::log('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $inbox, LOGGER_DEBUG);
Logger::log('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $inbox, Logger::DEBUG);
$success = true;

View file

@ -37,11 +37,11 @@ class CheckVersion
// don't check
return;
}
Logger::log("Checking VERSION from: ".$checked_url, LOGGER_DEBUG);
Logger::log("Checking VERSION from: ".$checked_url, Logger::DEBUG);
// fetch the VERSION file
$gitversion = DBA::escape(trim(Network::fetchUrl($checked_url)));
Logger::log("Upstream VERSION is: ".$gitversion, LOGGER_DEBUG);
Logger::log("Upstream VERSION is: ".$gitversion, Logger::DEBUG);
Config::set('system', 'git_friendica_version', $gitversion);

View file

@ -34,7 +34,7 @@ class CronJobs
return;
}
Logger::log("Starting cronjob " . $command, LOGGER_DEBUG);
Logger::log("Starting cronjob " . $command, Logger::DEBUG);
// Call possible post update functions
// see src/Database/PostUpdate.php for more details
@ -83,7 +83,7 @@ class CronJobs
return;
}
Logger::log("Xronjob " . $command . " is unknown.", LOGGER_DEBUG);
Logger::log("Xronjob " . $command . " is unknown.", Logger::DEBUG);
return;
}
@ -212,7 +212,7 @@ class CronJobs
// Calculate fragmentation
$fragmentation = $table["Data_free"] / ($table["Data_length"] + $table["Index_length"]);
Logger::log("Table " . $table["Name"] . " - Fragmentation level: " . round($fragmentation * 100, 2), LOGGER_DEBUG);
Logger::log("Table " . $table["Name"] . " - Fragmentation level: " . round($fragmentation * 100, 2), Logger::DEBUG);
// Don't optimize tables that needn't to be optimized
if ($fragmentation < $fragmentation_level) {
@ -220,7 +220,7 @@ class CronJobs
}
// So optimize it
Logger::log("Optimize Table " . $table["Name"], LOGGER_DEBUG);
Logger::log("Optimize Table " . $table["Name"], Logger::DEBUG);
q("OPTIMIZE TABLE `%s`", DBA::escape($table["Name"]));
}
}
@ -259,7 +259,7 @@ class CronJobs
continue;
}
Logger::log("Repair contact " . $contact["id"] . " " . $contact["url"], LOGGER_DEBUG);
Logger::log("Repair contact " . $contact["id"] . " " . $contact["url"], Logger::DEBUG);
q("UPDATE `contact` SET `batch` = '%s', `notify` = '%s', `poll` = '%s', pubkey = '%s' WHERE `id` = %d",
DBA::escape($data["batch"]), DBA::escape($data["notify"]), DBA::escape($data["poll"]), DBA::escape($data["pubkey"]),
intval($contact["id"]));

View file

@ -34,7 +34,7 @@ class Delivery extends BaseObject
public static function execute($cmd, $item_id, $contact_id)
{
Logger::log('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $contact_id, LOGGER_DEBUG);
Logger::log('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $contact_id, Logger::DEBUG);
$top_level = false;
$followup = false;
@ -126,7 +126,7 @@ class Delivery extends BaseObject
*/
if (!$top_level && ($parent['wall'] == 0) && stristr($target_item['uri'], $localhost)) {
Logger::log('Followup ' . $target_item["guid"], LOGGER_DEBUG);
Logger::log('Followup ' . $target_item["guid"], Logger::DEBUG);
// local followup to remote post
$followup = true;
}
@ -241,7 +241,7 @@ class Delivery extends BaseObject
$atom = DFRN::entries($msgitems, $owner);
}
Logger::log('Notifier entry: ' . $contact["url"] . ' ' . $target_item["guid"] . ' entry: ' . $atom, LOGGER_DATA);
Logger::log('Notifier entry: ' . $contact["url"] . ' ' . $target_item["guid"] . ' entry: ' . $atom, Logger::DATA);
$basepath = implode('/', array_slice(explode('/', $contact['url']), 0, 3));

View file

@ -34,7 +34,7 @@ class Directory
Addon::callHooks('globaldir_update', $arr);
Logger::log('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
Logger::log('Updating directory: ' . $arr['url'], Logger::DEBUG);
if (strlen($arr['url'])) {
Network::fetchUrl($dir . '?url=' . bin2hex($arr['url']));
}

View file

@ -90,7 +90,7 @@ class DiscoverPoCo
} else {
$result .= "failed";
}
Logger::log($result, LOGGER_DEBUG);
Logger::log($result, Logger::DEBUG);
} elseif ($mode == 3) {
GContact::updateSuggestions();
} elseif (($mode == 2) && Config::get('system', 'poco_completion')) {
@ -130,7 +130,7 @@ class DiscoverPoCo
if (!PortableContact::updateNeeded($server["created"], "", $server["last_failure"], $server["last_contact"])) {
continue;
}
Logger::log('Update server status for server '.$server["url"], LOGGER_DEBUG);
Logger::log('Update server status for server '.$server["url"], Logger::DEBUG);
Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", $server["url"]);
@ -141,7 +141,7 @@ class DiscoverPoCo
}
private static function discoverUsers() {
Logger::log("Discover users", LOGGER_DEBUG);
Logger::log("Discover users", Logger::DEBUG);
$starttime = time();
@ -209,7 +209,7 @@ class DiscoverPoCo
if (!is_null($data)) {
// Only search for the same item every 24 hours
if (time() < $data + (60 * 60 * 24)) {
Logger::log("Already searched for ".$search." in the last 24 hours", LOGGER_DEBUG);
Logger::log("Already searched for ".$search." in the last 24 hours", Logger::DEBUG);
return;
}
}
@ -222,7 +222,7 @@ class DiscoverPoCo
// Check if the contact already exists
$exists = q("SELECT `id`, `last_contact`, `last_failure`, `updated` FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($jj->url));
if (DBA::isResult($exists)) {
Logger::log("Profile ".$jj->url." already exists (".$search.")", LOGGER_DEBUG);
Logger::log("Profile ".$jj->url." already exists (".$search.")", Logger::DEBUG);
if (($exists[0]["last_contact"] < $exists[0]["last_failure"]) &&
($exists[0]["updated"] < $exists[0]["last_failure"])) {
@ -236,16 +236,16 @@ class DiscoverPoCo
$server_url = PortableContact::detectServer($jj->url);
if ($server_url != '') {
if (!PortableContact::checkServer($server_url)) {
Logger::log("Friendica server ".$server_url." doesn't answer.", LOGGER_DEBUG);
Logger::log("Friendica server ".$server_url." doesn't answer.", Logger::DEBUG);
continue;
}
Logger::log("Friendica server ".$server_url." seems to be okay.", LOGGER_DEBUG);
Logger::log("Friendica server ".$server_url." seems to be okay.", Logger::DEBUG);
}
$data = Probe::uri($jj->url);
if ($data["network"] == Protocol::DFRN) {
Logger::log("Profile ".$jj->url." is reachable (".$search.")", LOGGER_DEBUG);
Logger::log("Add profile ".$jj->url." to local directory (".$search.")", LOGGER_DEBUG);
Logger::log("Profile ".$jj->url." is reachable (".$search.")", Logger::DEBUG);
Logger::log("Add profile ".$jj->url." to local directory (".$search.")", Logger::DEBUG);
if ($jj->tags != "") {
$data["keywords"] = $jj->tags;
@ -255,7 +255,7 @@ class DiscoverPoCo
GContact::update($data);
} else {
Logger::log("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], LOGGER_DEBUG);
Logger::log("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], Logger::DEBUG);
}
}
}

View file

@ -27,7 +27,7 @@ class Expire
Hook::loadHooks();
if ($param == 'delete') {
Logger::log('Delete expired items', LOGGER_DEBUG);
Logger::log('Delete expired items', Logger::DEBUG);
// physically remove anything that has been deleted for more than two months
$condition = ["`deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"];
$rows = DBA::select('item', ['id'], $condition);
@ -38,35 +38,35 @@ class Expire
// Normally we shouldn't have orphaned data at all.
// If we do have some, then we have to check why.
Logger::log('Deleting orphaned item activities - start', LOGGER_DEBUG);
Logger::log('Deleting orphaned item activities - start', Logger::DEBUG);
$condition = ["NOT EXISTS (SELECT `iaid` FROM `item` WHERE `item`.`iaid` = `item-activity`.`id`)"];
DBA::delete('item-activity', $condition);
Logger::log('Orphaned item activities deleted: ' . DBA::affectedRows(), LOGGER_DEBUG);
Logger::log('Orphaned item activities deleted: ' . DBA::affectedRows(), Logger::DEBUG);
Logger::log('Deleting orphaned item content - start', LOGGER_DEBUG);
Logger::log('Deleting orphaned item content - start', Logger::DEBUG);
$condition = ["NOT EXISTS (SELECT `icid` FROM `item` WHERE `item`.`icid` = `item-content`.`id`)"];
DBA::delete('item-content', $condition);
Logger::log('Orphaned item content deleted: ' . DBA::affectedRows(), LOGGER_DEBUG);
Logger::log('Orphaned item content deleted: ' . DBA::affectedRows(), Logger::DEBUG);
// make this optional as it could have a performance impact on large sites
if (intval(Config::get('system', 'optimize_items'))) {
DBA::e("OPTIMIZE TABLE `item`");
}
Logger::log('Delete expired items - done', LOGGER_DEBUG);
Logger::log('Delete expired items - done', Logger::DEBUG);
return;
} elseif (intval($param) > 0) {
$user = DBA::selectFirst('user', ['uid', 'username', 'expire'], ['uid' => $param]);
if (DBA::isResult($user)) {
Logger::log('Expire items for user '.$user['uid'].' ('.$user['username'].') - interval: '.$user['expire'], LOGGER_DEBUG);
Logger::log('Expire items for user '.$user['uid'].' ('.$user['username'].') - interval: '.$user['expire'], Logger::DEBUG);
Item::expire($user['uid'], $user['expire']);
Logger::log('Expire items for user '.$user['uid'].' ('.$user['username'].') - done ', LOGGER_DEBUG);
Logger::log('Expire items for user '.$user['uid'].' ('.$user['username'].') - done ', Logger::DEBUG);
}
return;
} elseif ($param == 'hook' && !empty($hook_function)) {
foreach (Hook::getByName('expire') as $hook) {
if ($hook[1] == $hook_function) {
Logger::log("Calling expire hook '" . $hook[1] . "'", LOGGER_DEBUG);
Logger::log("Calling expire hook '" . $hook[1] . "'", Logger::DEBUG);
Hook::callSingle($a, 'expire', $hook, $data);
}
}
@ -80,7 +80,7 @@ class Expire
$r = DBA::p("SELECT `uid`, `username` FROM `user` WHERE `expire` != 0");
while ($row = DBA::fetch($r)) {
Logger::log('Calling expiry for user '.$row['uid'].' ('.$row['username'].')', LOGGER_DEBUG);
Logger::log('Calling expiry for user '.$row['uid'].' ('.$row['username'].')', Logger::DEBUG);
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
'Expire', (int)$row['uid']);
}
@ -88,7 +88,7 @@ class Expire
Logger::log('expire: calling hooks');
foreach (Hook::getByName('expire') as $hook) {
Logger::log("Calling expire hook for '" . $hook[1] . "'", LOGGER_DEBUG);
Logger::log("Calling expire hook for '" . $hook[1] . "'", Logger::DEBUG);
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
'Expire', 'hook', $hook[1]);
}

View file

@ -25,7 +25,7 @@ class GProbe {
DBA::escape(normalise_link($url))
);
Logger::log("gprobe start for ".normalise_link($url), LOGGER_DEBUG);
Logger::log("gprobe start for ".normalise_link($url), Logger::DEBUG);
if (!DBA::isResult($r)) {
// Is it a DDoS attempt?
@ -34,7 +34,7 @@ class GProbe {
$result = Cache::get("gprobe:".$urlparts["host"]);
if (!is_null($result)) {
if (in_array($result["network"], [Protocol::FEED, Protocol::PHANTOM])) {
Logger::log("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), LOGGER_DEBUG);
Logger::log("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), Logger::DEBUG);
return;
}
}
@ -61,7 +61,7 @@ class GProbe {
}
}
Logger::log("gprobe end for ".normalise_link($url), LOGGER_DEBUG);
Logger::log("gprobe end for ".normalise_link($url), Logger::DEBUG);
return;
}
}

View file

@ -58,7 +58,7 @@ class Notifier
{
$a = BaseObject::getApp();
Logger::log('notifier: invoked: '.$cmd.': '.$item_id, LOGGER_DEBUG);
Logger::log('notifier: invoked: '.$cmd.': '.$item_id, Logger::DEBUG);
$top_level = false;
$recipients = [];
@ -105,7 +105,7 @@ class Notifier
$inboxes = ActivityPub\Transmitter::fetchTargetInboxesforUser(0);
foreach ($inboxes as $inbox) {
Logger::log('Account removal for user ' . $item_id . ' to ' . $inbox .' via ActivityPub', LOGGER_DEBUG);
Logger::log('Account removal for user ' . $item_id . ' to ' . $inbox .' via ActivityPub', Logger::DEBUG);
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
'APDelivery', Delivery::REMOVAL, '', $inbox, $item_id);
}
@ -185,7 +185,7 @@ class Notifier
$condition = ['uri' => $target_item["thr-parent"], 'uid' => $target_item["uid"]];
$thr_parent = Item::selectFirst($fields, $condition);
Logger::log('GUID: '.$target_item["guid"].': Parent is '.$parent['network'].'. Thread parent is '.$thr_parent['network'], LOGGER_DEBUG);
Logger::log('GUID: '.$target_item["guid"].': Parent is '.$parent['network'].'. Thread parent is '.$thr_parent['network'], Logger::DEBUG);
// This is IMPORTANT!!!!
@ -249,7 +249,7 @@ class Notifier
$recipients = [$parent['contact-id']];
$recipients_followup = [$parent['contact-id']];
Logger::log('notifier: followup '.$target_item["guid"].' to '.$conversant_str, LOGGER_DEBUG);
Logger::log('notifier: followup '.$target_item["guid"].' to '.$conversant_str, Logger::DEBUG);
//if (!$target_item['private'] && $target_item['wall'] &&
if (!$target_item['private'] &&
@ -279,11 +279,11 @@ class Notifier
$push_notify = false;
}
Logger::log("Notify ".$target_item["guid"]." via PuSH: ".($push_notify?"Yes":"No"), LOGGER_DEBUG);
Logger::log("Notify ".$target_item["guid"]." via PuSH: ".($push_notify?"Yes":"No"), Logger::DEBUG);
} else {
$followup = false;
Logger::log('Distributing directly '.$target_item["guid"], LOGGER_DEBUG);
Logger::log('Distributing directly '.$target_item["guid"], Logger::DEBUG);
// don't send deletions onward for other people's stuff
@ -346,7 +346,7 @@ class Notifier
if (($thr_parent && ($thr_parent['network'] == Protocol::OSTATUS)) || ($parent['network'] == Protocol::OSTATUS)) {
$diaspora_delivery = false;
Logger::log('Some parent is OStatus for '.$target_item["guid"]." - Author: ".$thr_parent['author-id']." - Owner: ".$thr_parent['owner-id'], LOGGER_DEBUG);
Logger::log('Some parent is OStatus for '.$target_item["guid"]." - Author: ".$thr_parent['author-id']." - Owner: ".$thr_parent['owner-id'], Logger::DEBUG);
// Send a salmon to the parent author
$probed_contact = DBA::selectFirst('contact', ['url', 'notify'], ['id' => $thr_parent['author-id']]);
@ -365,7 +365,7 @@ class Notifier
// Send a salmon notification to every person we mentioned in the post
$arr = explode(',',$target_item['tag']);
foreach ($arr as $x) {
//Logger::log('Checking tag '.$x, LOGGER_DEBUG);
//Logger::log('Checking tag '.$x, Logger::DEBUG);
$matches = null;
if (preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) {
$probed_contact = Probe::uri($matches[1]);
@ -420,7 +420,7 @@ class Notifier
// delivery loop
if (DBA::isResult($r)) {
foreach ($r as $contact) {
Logger::log("Deliver ".$item_id." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG);
Logger::log("Deliver ".$item_id." to ".$contact['url']." via network ".$contact['network'], Logger::DEBUG);
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
'Delivery', $cmd, $item_id, (int)$contact['id']);
@ -470,7 +470,7 @@ class Notifier
$r = array_merge($r2, $r1);
if (DBA::isResult($r)) {
Logger::log('pubdeliver '.$target_item["guid"].': '.print_r($r,true), LOGGER_DEBUG);
Logger::log('pubdeliver '.$target_item["guid"].': '.print_r($r,true), Logger::DEBUG);
foreach ($r as $rr) {
// except for Diaspora batch jobs
@ -494,13 +494,13 @@ class Notifier
// Notify PuSH subscribers (Used for OStatus distribution of regular posts)
if ($push_notify) {
Logger::log('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG);
Logger::log('Activating internal PuSH for item '.$item_id, Logger::DEBUG);
// Handling the pubsubhubbub requests
PushSubscriber::publishFeed($owner['uid'], $a->queue['priority']);
}
Logger::log('notifier: calling hooks for ' . $cmd . ' ' . $item_id, LOGGER_DEBUG);
Logger::log('notifier: calling hooks for ' . $cmd . ' ' . $item_id, Logger::DEBUG);
if ($normal_mode) {
Hook::fork($a->queue['priority'], 'notifier_normal', $target_item);
@ -518,15 +518,15 @@ class Notifier
if ($target_item['origin']) {
$inboxes = ActivityPub\Transmitter::fetchTargetInboxes($target_item, $uid);
Logger::log('Origin item ' . $item_id . ' with URL ' . $target_item['uri'] . ' will be distributed.', LOGGER_DEBUG);
Logger::log('Origin item ' . $item_id . ' with URL ' . $target_item['uri'] . ' will be distributed.', Logger::DEBUG);
} elseif (!DBA::exists('conversation', ['item-uri' => $target_item['uri'], 'protocol' => Conversation::PARCEL_ACTIVITYPUB])) {
Logger::log('Remote item ' . $item_id . ' with URL ' . $target_item['uri'] . ' is no AP post. It will not be distributed.', LOGGER_DEBUG);
Logger::log('Remote item ' . $item_id . ' with URL ' . $target_item['uri'] . ' is no AP post. It will not be distributed.', Logger::DEBUG);
return;
} else {
// Remote items are transmitted via the personal inboxes.
// Doing so ensures that the dedicated receiver will get the message.
$personal = true;
Logger::log('Remote item ' . $item_id . ' with URL ' . $target_item['uri'] . ' will be distributed.', LOGGER_DEBUG);
Logger::log('Remote item ' . $item_id . ' with URL ' . $target_item['uri'] . ' will be distributed.', Logger::DEBUG);
}
if ($parent['origin']) {
@ -535,7 +535,7 @@ class Notifier
}
if (empty($inboxes)) {
Logger::log('No inboxes found for item ' . $item_id . ' with URL ' . $target_item['uri'] . '. It will not be distributed.', LOGGER_DEBUG);
Logger::log('No inboxes found for item ' . $item_id . ' with URL ' . $target_item['uri'] . '. It will not be distributed.', Logger::DEBUG);
return;
}
@ -543,7 +543,7 @@ class Notifier
ActivityPub\Transmitter::createCachedActivityFromItem($item_id, true);
foreach ($inboxes as $inbox) {
Logger::log('Deliver ' . $item_id .' to ' . $inbox .' via ActivityPub', LOGGER_DEBUG);
Logger::log('Deliver ' . $item_id .' to ' . $inbox .' via ActivityPub', Logger::DEBUG);
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
'APDelivery', $cmd, $item_id, $inbox, $uid);

View file

@ -87,7 +87,7 @@ class OnePoll
$updated = DateTimeFormat::utcNow();
if ($last_updated) {
Logger::log('Contact '.$contact['id'].' had last update on '.$last_updated, LOGGER_DEBUG);
Logger::log('Contact '.$contact['id'].' had last update on '.$last_updated, Logger::DEBUG);
// The last public item can be older than the last item we got
if ($last_updated < $contact['last-item']) {
@ -100,7 +100,7 @@ class OnePoll
} else {
self::updateContact($contact, ['last-update' => $updated, 'failure_update' => $updated]);
Contact::markForArchival($contact);
Logger::log('Contact '.$contact['id'].' is marked for archival', LOGGER_DEBUG);
Logger::log('Contact '.$contact['id'].' is marked for archival', Logger::DEBUG);
}
return;
@ -214,7 +214,7 @@ class OnePoll
$handshake_xml = $curlResult->getBody();
$html_code = $curlResult->getReturnCode();
Logger::log('handshake with url ' . $url . ' returns xml: ' . $handshake_xml, LOGGER_DATA);
Logger::log('handshake with url ' . $url . ' returns xml: ' . $handshake_xml, Logger::DATA);
if (!strlen($handshake_xml) || ($html_code >= 400) || !$html_code) {
Logger::log("$url appears to be dead - marking for death ");
@ -348,7 +348,7 @@ class OnePoll
$xml = $curlResult->getBody();
} elseif ($contact['network'] === Protocol::MAIL) {
Logger::log("Mail: Fetching for ".$contact['addr'], LOGGER_DEBUG);
Logger::log("Mail: Fetching for ".$contact['addr'], Logger::DEBUG);
$mail_disabled = ((function_exists('imap_open') && !Config::get('system', 'imap_disabled')) ? 0 : 1);
if ($mail_disabled) {
@ -358,7 +358,7 @@ class OnePoll
return;
}
Logger::log("Mail: Enabled", LOGGER_DEBUG);
Logger::log("Mail: Enabled", Logger::DEBUG);
$mbox = null;
$user = DBA::selectFirst('user', ['prvkey'], ['uid' => $importer_uid]);
@ -385,17 +385,17 @@ class OnePoll
$msgs = Email::poll($mbox, $contact['addr']);
if (count($msgs)) {
Logger::log("Mail: Parsing ".count($msgs)." mails from ".$contact['addr']." for ".$mailconf['user'], LOGGER_DEBUG);
Logger::log("Mail: Parsing ".count($msgs)." mails from ".$contact['addr']." for ".$mailconf['user'], Logger::DEBUG);
$metas = Email::messageMeta($mbox, implode(',', $msgs));
if (count($metas) != count($msgs)) {
Logger::log("for " . $mailconf['user'] . " there are ". count($msgs) . " messages but received " . count($metas) . " metas", LOGGER_DEBUG);
Logger::log("for " . $mailconf['user'] . " there are ". count($msgs) . " messages but received " . count($metas) . " metas", Logger::DEBUG);
} else {
$msgs = array_combine($msgs, $metas);
foreach ($msgs as $msg_uid => $meta) {
Logger::log("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);
Logger::log("Mail: Parsing mail ".$msg_uid, Logger::DATA);
$datarray = [];
$datarray['verb'] = ACTIVITY_POST;
@ -410,7 +410,7 @@ class OnePoll
$condition = ['uid' => $importer_uid, 'uri' => $datarray['uri']];
$item = Item::selectFirst($fields, $condition);
if (DBA::isResult($item)) {
Logger::log("Mail: Seen before ".$msg_uid." for ".$mailconf['user']." UID: ".$importer_uid." URI: ".$datarray['uri'],LOGGER_DEBUG);
Logger::log("Mail: Seen before ".$msg_uid." for ".$mailconf['user']." UID: ".$importer_uid." URI: ".$datarray['uri'],Logger::DEBUG);
// Only delete when mails aren't automatically moved or deleted
if (($mailconf['action'] != 1) && ($mailconf['action'] != 3))
@ -421,7 +421,7 @@ class OnePoll
switch ($mailconf['action']) {
case 0:
Logger::log("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", LOGGER_DEBUG);
Logger::log("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", Logger::DEBUG);
break;
case 1:
Logger::log("Mail: Deleting ".$msg_uid." for ".$mailconf['user']);
@ -555,7 +555,7 @@ class OnePoll
switch ($mailconf['action']) {
case 0:
Logger::log("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", LOGGER_DEBUG);
Logger::log("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", Logger::DEBUG);
break;
case 1:
Logger::log("Mail: Deleting ".$msg_uid." for ".$mailconf['user']);
@ -585,7 +585,7 @@ class OnePoll
}
if ($xml) {
Logger::log('received xml : ' . $xml, LOGGER_DATA);
Logger::log('received xml : ' . $xml, Logger::DATA);
if (!strstr($xml, '<')) {
Logger::log('post_handshake: response from ' . $url . ' did not contain XML.');

View file

@ -23,7 +23,7 @@ class ProfileUpdate {
$inboxes = ActivityPub\Transmitter::fetchTargetInboxesforUser($uid);
foreach ($inboxes as $inbox) {
Logger::log('Profile update for user ' . $uid . ' to ' . $inbox .' via ActivityPub', LOGGER_DEBUG);
Logger::log('Profile update for user ' . $uid . ' to ' . $inbox .' via ActivityPub', Logger::DEBUG);
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
'APDelivery', Delivery::PROFILEUPDATE, '', $inbox, $uid);
}

View file

@ -38,7 +38,7 @@ class PubSubPublish
/// @todo Check server status with PortableContact::checkServer()
// Before this can be done we need a way to safely detect the server url.
Logger::log("Generate feed of user " . $subscriber['nickname']. " to " . $subscriber['callback_url']. " - last updated " . $subscriber['last_update'], LOGGER_DEBUG);
Logger::log("Generate feed of user " . $subscriber['nickname']. " to " . $subscriber['callback_url']. " - last updated " . $subscriber['last_update'], Logger::DEBUG);
$last_update = $subscriber['last_update'];
$params = OStatus::feed($subscriber['nickname'], $last_update);
@ -55,7 +55,7 @@ class PubSubPublish
$subscriber['topic']),
"X-Hub-Signature: sha1=" . $hmac_sig];
Logger::log('POST ' . print_r($headers, true) . "\n" . $params, LOGGER_DATA);
Logger::log('POST ' . print_r($headers, true) . "\n" . $params, Logger::DATA);
$postResult = Network::post($subscriber['callback_url'], $params, $headers);
$ret = $postResult->getReturnCode();

View file

@ -50,7 +50,7 @@ class SpoolPost {
$result = Item::insert($arr);
Logger::log("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
Logger::log("Spool file ".$file." stored: ".$result, Logger::DEBUG);
unlink($fullfile);
}
closedir($dh);