mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 03:08:36 +12:00
Variadic templates for module logs
Two new module log types: Todo() and Notice()
This commit is contained in:
parent
da8194d659
commit
640de81571
29 changed files with 233 additions and 235 deletions
|
@ -158,60 +158,6 @@ void Module::SetName(const std::string& name)
|
|||
m_name = name;
|
||||
}
|
||||
|
||||
void Module::Log(const u32 id, std::string fmt, ...)
|
||||
{
|
||||
if(Ini.HLELogging.GetValue())
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
LOG_NOTICE(HLE, GetName() + fmt::Format("[%d]: ", id) + fmt::FormatV(fmt, list));
|
||||
va_end(list);
|
||||
}
|
||||
}
|
||||
|
||||
void Module::Log(std::string fmt, ...)
|
||||
{
|
||||
if(Ini.HLELogging.GetValue())
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
LOG_NOTICE(HLE, GetName() + ": " + fmt::FormatV(fmt, list));
|
||||
va_end(list);
|
||||
}
|
||||
}
|
||||
|
||||
void Module::Warning(const u32 id, std::string fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
LOG_WARNING(HLE, GetName() + fmt::Format("[%d] warning: ", id) + fmt::FormatV(fmt, list));
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
void Module::Warning(std::string fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
LOG_WARNING(HLE, GetName() + " warning: " + fmt::FormatV(fmt, list));
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
void Module::Error(const u32 id, std::string fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
LOG_ERROR(HLE, GetName() + fmt::Format("[%d] error: ", id) + fmt::FormatV(fmt, list));
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
void Module::Error(std::string fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
LOG_ERROR(HLE, GetName() + " error: " + fmt::FormatV(fmt, list));
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
bool Module::CheckID(u32 id) const
|
||||
{
|
||||
return Emu.GetIdManager().CheckID(id) && Emu.GetIdManager().GetID(id).m_name == GetName();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue