Migrate force_log_printf to new logging (#714)

This commit is contained in:
why-keith 2023-04-12 15:31:34 +01:00 committed by GitHub
parent 072c18a6e3
commit 4be57f4896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
108 changed files with 401 additions and 399 deletions

View file

@ -33,7 +33,7 @@ ActiveSettings::LoadOnce(const fs::path& user_data_path,
}
if (!TestWriteAccess(path))
{
cemuLog_log(LogType::Force, "Failed to write to {}", path.generic_string());
cemuLog_log(LogType::Force, "Failed to write to {}", _pathToUtf8(path));
failed_write_access.insert(path);
}
}

View file

@ -28,7 +28,7 @@ void CemuConfig::SetMLCPath(fs::path path, bool save)
catch (const PSDisabledException&) {}
catch (const std::exception& ex)
{
forceLog_printf("can't store custom mlc path in permanent storage: %s", ex.what());
cemuLog_log(LogType::Force, "can't store custom mlc path in permanent storage: {}", ex.what());
}
}
@ -114,7 +114,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load recently launched game file: %s", path.c_str());
cemuLog_log(LogType::Force, "config load error: can't load recently launched game file: {}", path);
}
}
@ -132,7 +132,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load recently launched nfc file: %s", path.c_str());
cemuLog_log(LogType::Force, "config load error: can't load recently launched nfc file: {}", path);
}
}
@ -150,7 +150,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load game path: %s", path.c_str());
cemuLog_log(LogType::Force, "config load error: can't load game path: {}", path);
}
}
@ -186,7 +186,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load game cache entry: %s", rpx);
cemuLog_log(LogType::Force, "config load error: can't load game cache entry: {}", rpx);
}
}
_lock.unlock();
@ -302,7 +302,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load tv device: %s", tv);
cemuLog_log(LogType::Force, "config load error: can't load tv device: {}", tv);
}
const auto pad = audio.get("PadDevice", "");
@ -312,7 +312,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load pad device: %s", pad);
cemuLog_log(LogType::Force, "config load error: can't load pad device: {}", pad);
}
const auto input_device_name = audio.get("InputDevice", "");
@ -322,7 +322,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
}
catch (const std::exception&)
{
forceLog_printf("config load error: can't load input device: %s", input_device_name);
cemuLog_log(LogType::Force, "config load error: can't load input device: {}", input_device_name);
}
// account

View file

@ -252,7 +252,7 @@ bool LaunchSettings::ExtractorTool(std::wstring_view wud_path, std::string_view
}
catch (const std::exception& ex)
{
forceLog_printf("can't write file: %s", ex.what());
cemuLog_log(LogType::Force, "can't write file: {}", ex.what());
puts(fmt::format("can't write file: %s\n", ex.what()).c_str());
}
}

View file

@ -25,7 +25,7 @@ PermanentStorage::~PermanentStorage()
if (ec)
{
SystemException ex(ec);
forceLog_printf("can't remove permanent storage: %s", ex.what());
cemuLog_log(LogType::Force, "can't remove permanent storage: {}", ex.what());
}
}
}

View file

@ -390,7 +390,7 @@ public:
fs::create_directories(fs::path(filename).parent_path(), err);
if (err)
{
forceLog_printf("can't create parent path for save file: %s", err.message().c_str());
cemuLog_log(LogType::Force, "can't create parent path for save file: {}", err.message());
return false;
}