mirror of
https://github.com/friendica/friendica
synced 2025-05-03 09:04:10 +02:00
Loglevels are adjusted
This commit is contained in:
parent
312e4d8844
commit
757a5c2de9
32 changed files with 93 additions and 111 deletions
|
@ -82,7 +82,7 @@ class Delivery
|
|||
if (empty($item_id) && !empty($uri_id) && !empty($uid)) {
|
||||
$item = Post::selectFirst(['id', 'parent', 'origin'], ['uri-id' => $uri_id, 'uid' => [$uid, 0]], ['order' => ['uid' => true]]);
|
||||
if (empty($item['id'])) {
|
||||
Logger::notice('Item not found, removing delivery', ['uri-id' => $uri_id, 'uid' => $uid, 'cmd' => $cmd, 'inbox' => $inbox]);
|
||||
Logger::warning('Item not found, removing delivery', ['uri-id' => $uri_id, 'uid' => $uid, 'cmd' => $cmd, 'inbox' => $inbox]);
|
||||
Post\Delivery::remove($uri_id, $inbox);
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -747,7 +747,7 @@ class DFRN
|
|||
$mentioned = [];
|
||||
|
||||
if (!$item['parent']) {
|
||||
Logger::notice('Item without parent found.', ['type' => $type, 'item' => $item]);
|
||||
Logger::warning('Item without parent found.', ['type' => $type, 'item' => $item]);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1466,9 +1466,8 @@ class DFRN
|
|||
|
||||
// update contact
|
||||
$old = Contact::selectFirst(['photo', 'url'], ['id' => $importer['id'], 'uid' => $importer['importer_uid']]);
|
||||
|
||||
if (!DBA::isResult($old)) {
|
||||
Logger::notice("Query failed to execute, no result returned in " . __FUNCTION__);
|
||||
Logger::warning('Existing contact had not been fetched', ['id' => $importer['id']]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1550,24 +1549,9 @@ class DFRN
|
|||
private static function getEntryType(array $importer, array $item): int
|
||||
{
|
||||
if ($item['thr-parent'] != $item['uri']) {
|
||||
$community = false;
|
||||
|
||||
if ($importer['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) {
|
||||
$sql_extra = '';
|
||||
$community = true;
|
||||
Logger::notice("possible community action");
|
||||
} else {
|
||||
$sql_extra = " AND `self` AND `wall`";
|
||||
}
|
||||
|
||||
// was the top-level post for this action written by somebody on this site?
|
||||
// Specifically, the recipient?
|
||||
$parent = Post::selectFirst(['wall'],
|
||||
["`uri` = ? AND `uid` = ?" . $sql_extra, $item['thr-parent'], $importer['importer_uid']]);
|
||||
|
||||
$is_a_remote_action = DBA::isResult($parent);
|
||||
|
||||
if ($is_a_remote_action) {
|
||||
if (Post::exists(['uri' => $item['thr-parent'], 'uid' => $importer['importer_uid'], 'self' => true, 'wall' => true])) {
|
||||
return DFRN::REPLY_RC;
|
||||
} else {
|
||||
return DFRN::REPLY;
|
||||
|
@ -1665,9 +1649,8 @@ class DFRN
|
|||
|
||||
if ($xt->type == Activity\ObjectType::NOTE) {
|
||||
$item_tag = Post::selectFirst(['id', 'uri-id'], ['uri' => $xt->id, 'uid' => $importer['importer_uid']]);
|
||||
|
||||
if (!DBA::isResult($item_tag)) {
|
||||
Logger::notice("Query failed to execute, no result returned in " . __FUNCTION__);
|
||||
Logger::warning('Post had not been fetched', ['uri' => $xt->id, 'uid' => $importer['importer_uid']]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ class Diaspora
|
|||
}
|
||||
|
||||
if (!($fields = self::validPosting($msg))) {
|
||||
Logger::notice('Invalid posting');
|
||||
Logger::warning('Invalid posting');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ class Diaspora
|
|||
if (is_null($fields)) {
|
||||
$private = true;
|
||||
if (!($fields = self::validPosting($msg))) {
|
||||
Logger::notice('Invalid posting');
|
||||
Logger::warning('Invalid posting');
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -1711,7 +1711,7 @@ class Diaspora
|
|||
}
|
||||
}
|
||||
if (!$conversation) {
|
||||
Logger::notice('Unable to create conversation.');
|
||||
Logger::warning('Unable to create conversation.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3644,7 +3644,7 @@ class Diaspora
|
|||
$attend_answer = 'tentative';
|
||||
break;
|
||||
default:
|
||||
Logger::notice('Unknown verb ' . $item['verb'] . ' in item ' . $item['guid']);
|
||||
Logger::warning('Unknown verb ' . $item['verb'] . ' in item ' . $item['guid']);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,12 +51,12 @@ class Email
|
|||
|
||||
$errors = imap_errors();
|
||||
if (!empty($errors)) {
|
||||
Logger::notice('IMAP Errors occured', ['errors' => $errors]);
|
||||
Logger::warning('IMAP Errors occured', ['errors' => $errors]);
|
||||
}
|
||||
|
||||
$alerts = imap_alerts();
|
||||
if (!empty($alerts)) {
|
||||
Logger::notice('IMAP Alerts occured: ', ['alerts' => $alerts]);
|
||||
Logger::warning('IMAP Alerts occured: ', ['alerts' => $alerts]);
|
||||
}
|
||||
|
||||
return $mbox;
|
||||
|
@ -78,21 +78,21 @@ class Email
|
|||
if (!$search1) {
|
||||
$search1 = [];
|
||||
} else {
|
||||
Logger::notice("Found mails from ".$email_addr);
|
||||
Logger::debug("Found mails from ".$email_addr);
|
||||
}
|
||||
|
||||
$search2 = @imap_search($mbox, 'UNDELETED TO "' . $email_addr . '"', SE_UID);
|
||||
if (!$search2) {
|
||||
$search2 = [];
|
||||
} else {
|
||||
Logger::notice("Found mails to ".$email_addr);
|
||||
Logger::debug("Found mails to ".$email_addr);
|
||||
}
|
||||
|
||||
$search3 = @imap_search($mbox, 'UNDELETED CC "' . $email_addr . '"', SE_UID);
|
||||
if (!$search3) {
|
||||
$search3 = [];
|
||||
} else {
|
||||
Logger::notice("Found mails cc ".$email_addr);
|
||||
Logger::debug("Found mails cc ".$email_addr);
|
||||
}
|
||||
|
||||
$res = array_unique(array_merge($search1, $search2, $search3));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue