Use fmt::format for LOGERROR

The format string can be checked at compile time. It will be easier to
transition to `std::format`.
This commit is contained in:
phosit committed 2026-10-05 20:29:26 +02:00
1 parent ba158aa3ff
commit 369a7e7e5d
115 files changed
+631 -454

No files matched your search

+2 -2
View File
@@ -181,7 +181,7 @@ Paths::Paths(const CmdLineArgs& args)
std::error_code ec{};
const std::filesystem::path cpath{std::filesystem::canonical(rpath, ec)};
if (ec)
LOGERROR("Failed to get absolute path of argv0, reason: %s", ec.message());
LOGERROR("Failed to get absolute path of argv0, reason: {}", ec.message());
else
pathname = OsPath(cpath.wstring());
}
@@ -189,7 +189,7 @@ Paths::Paths(const CmdLineArgs& args)
// make sure it's valid
if(!std::filesystem::is_regular_file(pathname.string()))
{
LOGERROR("Cannot find executable (expected at '%s')", pathname.string8());
LOGERROR("Cannot find executable (expected at '{}')", pathname.string8());
WARN_IF_ERR(StatusFromErrno());
}