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

@ -102,7 +102,7 @@ function display_init(App $a)
}
if (!empty($_SERVER['HTTP_ACCEPT']) && strstr($_SERVER['HTTP_ACCEPT'], 'application/atom+xml')) {
Logger::info('Directly serving XML for uri-id '.$item['uri-id']);
Logger::debug('Directly serving XML', ['uri-id' => $item['uri-id']]);
displayShowFeed($item['uri-id'], $item['uid'], false);
}

View file

@ -89,7 +89,7 @@ function item_post(App $a) {
*/
if (!$preview && !empty($_REQUEST['post_id_random'])) {
if (!empty($_SESSION['post-random']) && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
Logger::info('item post: duplicate post');
Logger::warning('duplicate post');
item_post_return(DI::baseUrl(), $api_source, $return_path);
} else {
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
@ -177,7 +177,7 @@ function item_post(App $a) {
// Now check that valid personal details have been provided
if (!Security::canWriteToUserWall($profile_uid) && !$allow_comment) {
Logger::notice('Permission denied.', ['local' => local_user(), 'profile_uid' => $profile_uid, 'toplevel_item_id' => $toplevel_item_id, 'network' => $toplevel_item['network']]);
Logger::warning('Permission denied.', ['local' => local_user(), 'profile_uid' => $profile_uid, 'toplevel_item_id' => $toplevel_item_id, 'network' => $toplevel_item['network']]);
notice(DI::l10n()->t('Permission denied.'));
if ($return_path) {
DI::baseUrl()->redirect($return_path);
@ -755,7 +755,7 @@ function item_post(App $a) {
}
}
Logger::info('post_complete');
Logger::debug('post_complete');
if ($api_source) {
return $post_id;
@ -780,7 +780,7 @@ function item_post_return($baseurl, $api_source, $return_path)
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
}
Logger::info('post_json', ['json' => $json]);
Logger::debug('post_json', ['json' => $json]);
System::jsonExit($json);
}
@ -866,7 +866,7 @@ function drop_item(int $id, string $return = '')
item_redirect_after_action($item, $return);
} else {
Logger::notice('Permission denied.', ['local' => local_user(), 'uid' => $item['uid'], 'cid' => $contact_id]);
Logger::warning('Permission denied.', ['local' => local_user(), 'uid' => $item['uid'], 'cid' => $contact_id]);
notice(DI::l10n()->t('Permission denied.'));
DI::baseUrl()->redirect('display/' . $item['guid']);
//NOTREACHED

View file

@ -304,7 +304,7 @@ function photos_post(App $a)
}
if (!empty($_POST['rotate']) && (intval($_POST['rotate']) == 1 || intval($_POST['rotate']) == 2)) {
Logger::notice('rotate');
Logger::debug('rotate');
$photo = Photo::getPhotoForUser($page_owner_uid, $resource_id);
@ -580,7 +580,7 @@ function photos_post(App $a)
$album = trim($_REQUEST['album'] ?? '');
$newalbum = trim($_REQUEST['newalbum'] ?? '');
Logger::info('album= ' . $album . ' newalbum= ' . $newalbum);
Logger::debug('album= ' . $album . ' newalbum= ' . $newalbum);
if (!strlen($album)) {
if (strlen($newalbum)) {
@ -711,7 +711,7 @@ function photos_post(App $a)
$r = Photo::store($image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 0 , Photo::DEFAULT, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
if (!$r) {
Logger::info('image store failed');
Logger::warning('image store failed');
notice(DI::l10n()->t('Image upload failed.'));
return;
}

View file

@ -108,7 +108,7 @@ function settings_post(App $a)
'pubmail' => $mail_pubmail
], ['uid' => local_user()]);
Logger::notice('updating mailaccount', ['response' => $r]);
Logger::debug('updating mailaccount', ['response' => $r]);
$mailacct = DBA::selectFirst('mailacct', [], ['uid' => local_user()]);
if (DBA::isResult($mailacct)) {
$mb = Email::constructMailboxName($mailacct);

View file

@ -51,7 +51,7 @@ function tagger_content(App $a) {
$item_id = ((DI::args()->getArgc() > 1) ? trim(DI::args()->getArgv()[1]) : 0);
Logger::notice('tagger: tag ' . $term . ' item ' . $item_id);
Logger::info('tagger: tag ' . $term . ' item ' . $item_id);
$item = Post::selectFirst([], ['id' => $item_id]);
@ -69,7 +69,7 @@ function tagger_content(App $a) {
$contact = Contact::selectFirst([], ['self' => true, 'uid' => local_user()]);
if (!DBA::isResult($contact)) {
Logger::notice('tagger: no contact_id');
Logger::warning('Self contact not found.', ['uid' => local_user()]);
return;
}