diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2019-08-02 01:49:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 01:49:33 -0500 |
| commit | cff526415d781cb8a7761961ae2bd1fb6775c376 (patch) | |
| tree | cf5ff4f0d7bdd3767155a8a3e251201861284f89 /src/modinfo.cpp | |
| parent | bdf45aea69ab7df0b01eb87cc80a2641ea4261d0 (diff) | |
| parent | e4cf2c314d6397c5d73bcf567d4420171238bd29 (diff) | |
Merge pull request #807 from isanae/logging-rework
Logging rework
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 3484b644..5a05e7ca 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -37,6 +37,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <appconfig.h> #include <scriptextender.h> #include <unmanagedmods.h> +#include <log.h> #include <QApplication> #include <QDirIterator> @@ -319,13 +320,12 @@ bool ModInfo::checkAllForUpdate(PluginContainer *pluginContainer, QObject *recei } if (organizedGames.empty()) { - qWarning() << tr("All of your mods have been checked recently. We restrict update checks to help preserve your available API requests."); + log::warn("{}", tr("All of your mods have been checked recently. We restrict update checks to help preserve your available API requests.")); updatesAvailable = false; } else { - qInfo() << tr( + log::info("{}", tr( "You have mods that haven't been checked within the last month using the new API. These mods must be checked before we can use the bulk update API. " - "This will consume significantly more API requests than usual. You will need to rerun the update check once complete in order to parse the remaining mods." - ); + "This will consume significantly more API requests than usual. You will need to rerun the update check once complete in order to parse the remaining mods.")); } for (auto game : organizedGames) @@ -412,7 +412,7 @@ void ModInfo::manualUpdateCheck(PluginContainer *pluginContainer, QObject *recei }); if (mods.size()) { - qInfo("Checking updates for %d mods...", mods.size()); + log::info("Checking updates for {} mods...", mods.size()); for (auto mod : mods) { organizedGames.insert(std::make_pair<QString, int>(mod->getGameName().toLower(), mod->getNexusID())); @@ -422,7 +422,7 @@ void ModInfo::manualUpdateCheck(PluginContainer *pluginContainer, QObject *recei NexusInterface::instance(pluginContainer)->requestUpdates(game.second, receiver, QVariant(), game.first, QString()); } } else { - qInfo("None of the selected mods can be updated."); + log::info("None of the selected mods can be updated."); } } @@ -530,10 +530,7 @@ QUrl ModInfo::parseCustomURL() const const auto url = QUrl::fromUserInput(getCustomURL()); if (!url.isValid()) { - qCritical() - << "mod '" << name() << "' has an invalid custom url " - << "'" << getCustomURL() << "'"; - + log::error("mod '{}' has an invalid custom url '{}'", name(), getCustomURL()); return {}; } |
