Logging system rework

* use one central unified log with channels/priorities ad-hoc listener registration and de-registration
* disable buffering by default
* add multi-threaded ringbuffer implementation
* use buffered listener for the gui (using the ringbuffer)
This commit is contained in:
Peter Tissen 2014-06-17 17:44:03 +02:00 committed by Bigpet
parent 394b698e92
commit 21da317453
165 changed files with 1731 additions and 1519 deletions

View file

@ -1,5 +1,5 @@
#include "stdafx.h"
#include "Emu/ConLog.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUThread.h"
@ -160,7 +160,7 @@ void Module::Log(const u32 id, std::string fmt, ...)
{
va_list list;
va_start(list, fmt);
ConLog.Write(GetName() + fmt::Format("[%d]: ", id) + fmt::FormatV(fmt, list));
LOG_NOTICE(HLE, GetName() + fmt::Format("[%d]: ", id) + fmt::FormatV(fmt, list));
va_end(list);
}
}
@ -171,7 +171,7 @@ void Module::Log(std::string fmt, ...)
{
va_list list;
va_start(list, fmt);
ConLog.Write(GetName() + ": " + fmt::FormatV(fmt, list));
LOG_NOTICE(HLE, GetName() + ": " + fmt::FormatV(fmt, list));
va_end(list);
}
}
@ -180,7 +180,7 @@ void Module::Warning(const u32 id, std::string fmt, ...)
{
va_list list;
va_start(list, fmt);
ConLog.Warning(GetName() + fmt::Format("[%d] warning: ", id) + fmt::FormatV(fmt, list));
LOG_WARNING(HLE, GetName() + fmt::Format("[%d] warning: ", id) + fmt::FormatV(fmt, list));
va_end(list);
}
@ -188,7 +188,7 @@ void Module::Warning(std::string fmt, ...)
{
va_list list;
va_start(list, fmt);
ConLog.Warning(GetName() + " warning: " + fmt::FormatV(fmt, list));
LOG_WARNING(HLE, GetName() + " warning: " + fmt::FormatV(fmt, list));
va_end(list);
}
@ -196,7 +196,7 @@ void Module::Error(const u32 id, std::string fmt, ...)
{
va_list list;
va_start(list, fmt);
ConLog.Error(GetName() + fmt::Format("[%d] error: ", id) + fmt::FormatV(fmt, list));
LOG_ERROR(HLE, GetName() + fmt::Format("[%d] error: ", id) + fmt::FormatV(fmt, list));
va_end(list);
}
@ -204,7 +204,7 @@ void Module::Error(std::string fmt, ...)
{
va_list list;
va_start(list, fmt);
ConLog.Error(GetName() + " error: " + fmt::FormatV(fmt, list));
LOG_ERROR(HLE, GetName() + " error: " + fmt::FormatV(fmt, list));
va_end(list);
}