Replace deprecated log calls

This commit is contained in:
Michael 2021-10-20 18:53:52 +00:00
parent 353cd66b26
commit f6faae5bb1
28 changed files with 163 additions and 163 deletions

View file

@ -2395,7 +2395,7 @@ class Contact
}
if (($network != '') && ($ret['network'] != $network)) {
Logger::log('Expected network ' . $network . ' does not match actual network ' . $ret['network']);
Logger::notice('Expected network ' . $network . ' does not match actual network ' . $ret['network']);
return $result;
}
@ -2545,7 +2545,7 @@ class Contact
}
} elseif ($protocol == Protocol::DIASPORA) {
$ret = Diaspora::sendShare($owner, $contact);
Logger::log('share returns: ' . $ret);
Logger::notice('share returns: ' . $ret);
} elseif ($protocol == Protocol::ACTIVITYPUB) {
$activity_id = ActivityPub\Transmitter::activityIDFromContact($contact_id);
if (empty($activity_id)) {
@ -2554,7 +2554,7 @@ class Contact
}
$ret = ActivityPub\Transmitter::sendActivity('Follow', $contact['url'], $uid, $activity_id);
Logger::log('Follow returns: ' . $ret);
Logger::notice('Follow returns: ' . $ret);
}
}
@ -2672,7 +2672,7 @@ class Contact
} else {
// send email notification to owner?
if (DBA::exists('contact', ['nurl' => Strings::normaliseLink($url), 'uid' => $importer['uid'], 'pending' => true])) {
Logger::log('ignoring duplicated connection request from pending contact ' . $url);
Logger::notice('ignoring duplicated connection request from pending contact ' . $url);
return null;
}
@ -2791,7 +2791,7 @@ class Contact
$contacts = DBA::select('contact', ['id', 'uid', 'name', 'url', 'bd'], $condition);
while ($contact = DBA::fetch($contacts)) {
Logger::log('update_contact_birthday: ' . $contact['bd']);
Logger::notice('update_contact_birthday: ' . $contact['bd']);
$nextbd = DateTimeFormat::utcNow('Y') . substr($contact['bd'], 4);

View file

@ -230,7 +230,7 @@ class Event
}
DBA::delete('event', ['id' => $event_id]);
Logger::log("Deleted event ".$event_id, Logger::DEBUG);
Logger::info("Deleted event", ['id' => $event_id]);
}
/**

View file

@ -971,7 +971,7 @@ class Item
}
if (!empty($item['cancel'])) {
Logger::log('post cancelled by addon.');
Logger::notice('post cancelled by addon.');
return 0;
}
@ -1885,7 +1885,7 @@ class Item
foreach ($matches as $mtch) {
if (Strings::compareLink($link, $mtch[1]) || Strings::compareLink($dlink, $mtch[1])) {
$mention = true;
Logger::log('mention found: ' . $mtch[2]);
Logger::notice('mention found', ['mention' => $mtch[2]]);
}
}
}
@ -2305,7 +2305,7 @@ class Item
++$expired;
}
DBA::close($items);
Logger::log('User ' . $uid . ": expired $expired items; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
Logger::notice('User ' . $uid . ": expired $expired items; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
}
public static function firstPostDate($uid, $wall = false)
@ -2354,7 +2354,7 @@ class Item
$item = Post::selectFirst(self::ITEM_FIELDLIST, ['id' => $item_id]);
if (!DBA::isResult($item)) {
Logger::log('like: unknown item ' . $item_id);
Logger::notice('like: unknown item', ['id' => $item_id]);
return false;
}

View file

@ -187,7 +187,7 @@ class Mail
}
if (!$convid) {
Logger::log('send message: conversation not found.');
Logger::notice('send message: conversation not found.');
return -4;
}
@ -291,7 +291,7 @@ class Mail
}
if (!$convid) {
Logger::log('send message: conversation not found.');
Logger::notice('send message: conversation not found.');
return -4;
}

View file

@ -1517,7 +1517,7 @@ class User
return false;
}
Logger::log('Removing user: ' . $uid);
Logger::notice('Removing user', ['user' => $uid]);
$user = DBA::selectFirst('user', [], ['uid' => $uid]);