logging/format: use std::format_string to catch formatting string errors at compile time (#3377)

* fix(log): use constexpr format string

* deprecate getFormat
This commit is contained in:
memchr
2023-09-20 07:26:20 +00:00
committed by GitHub
parent d8d0cd75c2
commit 6594b50e57
15 changed files with 130 additions and 171 deletions

View File

@@ -57,7 +57,7 @@ void CHookSystemManager::emit(const std::vector<SCallbackFNPtr>* callbacks, std:
} catch (std::exception& e) {
// TODO: this works only once...?
faultyHandles.push_back(cb.handle);
Debug::log(ERR, " [hookSystem] Hook from plugin {:x} caused a SIGSEGV, queueing for unloading.", (uintptr_t)cb.handle);
Debug::log(ERR, "[hookSystem] Hook from plugin {:x} caused a SIGSEGV, queueing for unloading.", (uintptr_t)cb.handle);
}
}
@@ -73,7 +73,7 @@ std::vector<SCallbackFNPtr>* CHookSystemManager::getVecForEvent(const std::strin
if (IT != m_lpRegisteredHooks.end())
return &IT->second;
Debug::log(LOG, " [hookSystem] New hook event registered: {}", event);
Debug::log(LOG, "[hookSystem] New hook event registered: {}", event);
return &m_lpRegisteredHooks.emplace_back(std::make_pair<>(event, std::vector<SCallbackFNPtr>{})).second;
}