fix unformmated log::log functions

This commit is contained in:
altalk23 2022-10-12 21:31:33 +03:00
parent 851b87acc8
commit 377aa3f7ce
6 changed files with 9 additions and 8 deletions

View file

@ -9,7 +9,7 @@ class $modify(AppDelegate) {
auto r = Loader::get()->saveSettings();
if (!r) {
log::log(Severity::Error, Loader::getInternalMod(), r.error());
log::log(Severity::Error, Loader::getInternalMod(), "{}", r.error());
}
log::log(Severity::Info, Loader::getInternalMod(), "Saved");

View file

@ -42,7 +42,7 @@ InternalMod::InternalMod() : Mod(getInternalModInfo()) {
auto sett = this->loadSettings();
if (!sett) {
log::log(Severity::Error, this, sett.error());
log::log(Severity::Error, this, "{}", sett.error());
}
}

View file

@ -86,7 +86,7 @@ bool InternalLoader::loadHooks() {
for (auto const& hook : internalHooks()) {
auto res = hook.mod->addHook(hook.hook);
if (!res) {
log::log(Severity::Error, hook.mod, res.error());
log::log(Severity::Error, hook.mod, "{}", res.error());
thereWereErrors = true;
}
}

View file

@ -78,7 +78,8 @@ Result<> Mod::loadSettings() {
log::log(
Severity::Warning,
this,
"Encountered unknown setting \"" + key + "\" while loading settings"
"Encountered unknown setting \"{}\" while loading settings",
key
);
}
}
@ -382,13 +383,13 @@ bool Mod::updateDependencyStates() {
auto r = dep.m_mod->load();
if (!r) {
dep.m_state = ModResolveState::Unloaded;
log::log(Severity::Error, dep.m_mod, r.error());
log::log(Severity::Error, dep.m_mod, "{}", r.error());
}
else {
auto r = dep.m_mod->enable();
if (!r) {
dep.m_state = ModResolveState::Disabled;
log::log(Severity::Error, dep.m_mod, r.error());
log::log(Severity::Error, dep.m_mod, "{}", r.error());
}
}
} else {

View file

@ -8,7 +8,7 @@ std::string g_lastError = "";
void geode_mod_log(void* cmod, const char* message) {
auto mod = reinterpret_cast<Mod*>(cmod);
log::log(Severity::Debug, mod, message);
log::log(Severity::Debug, mod, "{}", message);
}
bool geode_mod_add_hook(void* cmod, void* address, void* detour) {

View file

@ -41,7 +41,7 @@ Result<Mod*> Loader::loadModFromFile(std::string const& path) {
auto sett = mod->loadSettings();
if (!sett) {
log::log(Severity::Error, mod, sett.error());
log::log(Severity::Error, mod, "{}", sett.error());
}
// enable mod if needed