diff --git a/mod/tagger.php b/mod/tagger.php index f4f77c08e..e0d95ce66 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -51,7 +51,7 @@ function tagger_content(App $a) { $item_id = ((DI::args()->getArgc() > 1) ? trim(DI::args()->getArgv()[1]) : 0); - Logger::info('tagger: tag ' . $term . ' item ' . $item_id); + Logger::info('tagger: tag', ['term' => $term, 'item' => $item_id]); $item = Post::selectFirst([], ['id' => $item_id]); diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 8abb8c178..f7ab2bc7c 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -104,7 +104,7 @@ class Worker foreach ($r as $entry) { // The work will be done if (!self::execute($entry)) { - Logger::warning('Process execution failed, quitting.'); + Logger::warning('Process execution failed, quitting.', ['entry' => $entry]); return; } diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 287fc65ad..4d9ff4b6a 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -1095,7 +1095,7 @@ class Photo $r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc); if (!$r) { - Logger::warning('Photo could not be stored'); + Logger::warning('Photo could not be stored', ['uid' => $user['uid'], 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]); return []; } @@ -1182,7 +1182,7 @@ class Photo $r = self::store($image, $uid, 0, $resource_id, $filename, $album, 4, self::USER_AVATAR); if (!$r) { - logger::warning('profile image upload with scale 4 (300) failed'); + logger::warning('profile image upload with scale 4 (300) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]); } if ($width > 80 || $height > 80) { @@ -1191,7 +1191,7 @@ class Photo $r = self::store($image, $uid, 0, $resource_id, $filename, $album, 5, self::USER_AVATAR); if (!$r) { - logger::warning('profile image upload with scale 5 (80) failed'); + logger::warning('profile image upload with scale 5 (80) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]); } if ($width > 48 || $height > 48) { @@ -1200,7 +1200,7 @@ class Photo $r = self::store($image, $uid, 0, $resource_id, $filename, $album, 6, self::USER_AVATAR); if (!$r) { - logger::warning('profile image upload with scale 6 (48) failed'); + logger::warning('profile image upload with scale 6 (48) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]); } logger::info('new profile image upload ended');