1
0
Fork 0

Loglevels are adjusted

This commit is contained in:
Michael 2022-08-30 19:45:30 +00:00
commit 757a5c2de9
32 changed files with 93 additions and 111 deletions

View file

@ -103,12 +103,12 @@ class Delivery
DBA::close($itemdata);
if (empty($target_item)) {
Logger::notice('Item ' . $target_id . "wasn't found. Quitting here.");
Logger::warning('Item ' . $target_id . "wasn't found. Quitting here.");
return;
}
if (empty($parent)) {
Logger::notice('Parent ' . $parent_id . ' for item ' . $target_id . "wasn't found. Quitting here.");
Logger::warning('Parent ' . $parent_id . ' for item ' . $target_id . "wasn't found. Quitting here.");
self::setFailedQueue($cmd, $target_item);
return;
}
@ -182,7 +182,7 @@ class Delivery
}
if (empty($items)) {
Logger::notice('No delivery data', ['command' => $cmd, 'uri-id' => $post_uriid, 'cid' => $contact_id]);
Logger::warning('No delivery data', ['command' => $cmd, 'uri-id' => $post_uriid, 'cid' => $contact_id]);
}
$owner = Model\User::getOwnerDataById($uid);
@ -432,7 +432,7 @@ class Delivery
Logger::notice('diaspora status: ' . $loc);
$deliver_status = Diaspora::sendStatus($target_item, $owner, $contact, $public_message);
} else {
Logger::notice('Unknown mode ' . $cmd . ' for ' . $loc);
Logger::warning('Unknown mode', ['command' => $cmd, 'target' => $loc]);
return;
}

View file

@ -394,7 +394,7 @@ class OnePoll
$datarray = Email::getMessage($mbox, $msg_uid, $reply, $datarray);
if (empty($datarray['body'])) {
Logger::notice("Mail: can't fetch msg ".$msg_uid." for ".$mailconf['user']);
Logger::warning('Cannot fetch mail', ['msg-id' => $msg_uid, 'uid' => $mailconf['user']]);
continue;
}

View file

@ -56,7 +56,7 @@ class RemoveUnusedAvatars
Logger::notice('We are outside of the maintenance window, quitting');
return;
}
Logger::notice('In removal', ['count' => $count, 'total' => $total]);
Logger::info('In removal', ['count' => $count, 'total' => $total]);
}
}
DBA::close($contacts);

View file

@ -80,7 +80,7 @@ class RemoveUnusedContacts
DBA::delete('contact', ['id' => $contact['id']]);
if ((++$count % 1000) == 0) {
Logger::notice('In removal', ['count' => $count, 'total' => $total]);
Logger::info('In removal', ['count' => $count, 'total' => $total]);
}
}
DBA::close($contacts);

View file

@ -38,7 +38,7 @@ class SpoolPost {
// It is not named like a spool file, so we don't care.
if (substr($file, 0, 5) != "item-") {
Logger::notice('Spool file does does not start with "item-"', ['file' => $file]);
Logger::info('Spool file does does not start with "item-"', ['file' => $file]);
continue;
}
@ -46,13 +46,13 @@ class SpoolPost {
// We don't care about directories either
if (filetype($fullfile) != "file") {
Logger::notice('Spool file is no file', ['file' => $file]);
Logger::info('Spool file is no file', ['file' => $file]);
continue;
}
// We can't read or write the file? So we don't care about it.
if (!is_writable($fullfile) || !is_readable($fullfile)) {
Logger::notice('Spool file has insufficent permissions', ['file' => $file, 'writable' => is_writable($fullfile), 'readable' => is_readable($fullfile)]);
Logger::warning('Spool file has insufficent permissions', ['file' => $file, 'writable' => is_writable($fullfile), 'readable' => is_readable($fullfile)]);
continue;
}
@ -66,13 +66,13 @@ class SpoolPost {
// Skip if it doesn't seem to be an item array
if (!isset($arr['uid']) && !isset($arr['uri']) && !isset($arr['network'])) {
Logger::notice('Spool file does not contain the needed fields', ['file' => $file]);
Logger::warning('Spool file does not contain the needed fields', ['file' => $file]);
continue;
}
$result = Item::insert($arr);
Logger::notice('Spool file is stored', ['file' => $file, 'result' => $result]);
Logger::info('Spool file is stored', ['file' => $file, 'result' => $result]);
unlink($fullfile);
}
closedir($dh);