1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-20 17:01:28 +00:00

Logger::log - allow specifying errno

bump severity of PDO exception log messages to E_USER_WARNING
This commit is contained in:
Andrew Dolgov
2020-09-29 10:08:54 +03:00
parent 3b17c45887
commit 82bc740363
4 changed files with 7 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ class RSSUtils {
Debug::log("!! Last error: $error_message");
Logger::get()->log(
Logger::get()->log(E_USER_NOTICE,
sprintf("Update process for feed %d (%s, owner UID: %d) failed with exit code: %d (%s).",
$tline["id"], clean($tline["title"]), $tline["owner_uid"], $exit_code, clean($error_message)));
}
@@ -186,7 +186,7 @@ class RSSUtils {
if (!self::update_rss_feed($tline["id"], true)) {
global $fetch_last_error;
Logger::get()->log(
Logger::get()->log(E_USER_NOTICE,
sprintf("Update request for feed %d (%s, owner UID: %d) failed: %s.",
$tline["id"], clean($tline["title"]), $tline["owner_uid"], clean($fetch_last_error)));
}
@@ -194,7 +194,7 @@ class RSSUtils {
Debug::log(sprintf("<= %.4f (sec) (not using a separate process)", microtime(true) - $fstarted));
} catch (PDOException $e) {
Logger::get()->log_error(E_USER_NOTICE, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
Logger::get()->log_error(E_USER_WARNING, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
try {
$pdo->rollback();