summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-11-09 07:28:28 -0500
committerGitHub <noreply@github.com>2020-11-09 07:28:28 -0500
commit43e2f0e88f80686c2b76dcba4241a7be64e7bf55 (patch)
tree6239b48c9772616eb06df599e88fc833d0c1a7e6
parent72997c17d02b60386c564124f63d33cdf3743475 (diff)
parent52f2fadb369a69081e50bac6289394a1be417b6f (diff)
Merge pull request #9235 from lioncash/ui-log
UICommon: Migrate logging over to fmt
-rw-r--r--Source/Core/UICommon/AutoUpdate.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/Core/UICommon/AutoUpdate.cpp b/Source/Core/UICommon/AutoUpdate.cpp
index 4b457c6aa4..a4a7bffec3 100644
--- a/Source/Core/UICommon/AutoUpdate.cpp
+++ b/Source/Core/UICommon/AutoUpdate.cpp
@@ -164,24 +164,24 @@ void AutoUpdateChecker::CheckForUpdate()
auto resp = req.Get(url);
if (!resp)
{
- ERROR_LOG(COMMON, "Auto-update request failed");
+ ERROR_LOG_FMT(COMMON, "Auto-update request failed");
return;
}
- std::string contents(reinterpret_cast<char*>(resp->data()), resp->size());
- INFO_LOG(COMMON, "Auto-update JSON response: %s", contents.c_str());
+ const std::string contents(reinterpret_cast<char*>(resp->data()), resp->size());
+ INFO_LOG_FMT(COMMON, "Auto-update JSON response: {}", contents);
picojson::value json;
- std::string err = picojson::parse(json, contents);
+ const std::string err = picojson::parse(json, contents);
if (!err.empty())
{
- ERROR_LOG(COMMON, "Invalid JSON received from auto-update service: %s", err.c_str());
+ ERROR_LOG_FMT(COMMON, "Invalid JSON received from auto-update service: {}", err);
return;
}
picojson::object obj = json.get<picojson::object>();
if (obj["status"].get<std::string>() != "outdated")
{
- INFO_LOG(COMMON, "Auto-update status: we are up to date.");
+ INFO_LOG_FMT(COMMON, "Auto-update status: we are up to date.");
return;
}
@@ -229,9 +229,8 @@ void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInforma
#endif
// Run the updater!
- std::string command_line = MakeUpdaterCommandLine(updater_flags);
-
- INFO_LOG(COMMON, "Updater command line: %s", command_line.c_str());
+ const std::string command_line = MakeUpdaterCommandLine(updater_flags);
+ INFO_LOG_FMT(COMMON, "Updater command line: {}", command_line);
#ifdef _WIN32
STARTUPINFO sinfo = {sizeof(sinfo)};
@@ -245,12 +244,12 @@ void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInforma
}
else
{
- ERROR_LOG(COMMON, "Could not start updater process: error=%d", GetLastError());
+ ERROR_LOG_FMT(COMMON, "Could not start updater process: error={}", GetLastError());
}
#else
if (popen(command_line.c_str(), "r") == nullptr)
{
- ERROR_LOG(COMMON, "Could not start updater process: error=%d", errno);
+ ERROR_LOG_FMT(COMMON, "Could not start updater process: error={}", errno);
}
#endif