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/FS/vfsDir.h"
@ -39,7 +39,7 @@ public:
virtual wxDirTraverseResult OnFile(const wxString& filename)
{
if (!wxRemoveFile(filename)){
ConLog.Error("Couldn't delete File: %s", fmt::ToUTF8(filename).c_str());
LOGF_ERROR(HLE, "Couldn't delete File: %s", fmt::ToUTF8(filename).c_str());
}
return wxDIR_CONTINUE;
}
@ -103,7 +103,7 @@ void GameViewer::OnColClick(wxListEvent& event)
void GameViewer::LoadGames()
{
vfsDir dir(m_path);
ConLog.Write("path: %s", m_path.c_str());
LOGF_NOTICE(HLE, "path: %s", m_path.c_str());
if(!dir.IsOpened()) return;
m_games.clear();
@ -207,7 +207,7 @@ void GameViewer::DClick(wxListEvent& event)
std::string local_path;
if(Emu.GetVFS().GetDevice(path, local_path) && !Emu.BootGame(local_path))
{
ConLog.Error("Boot error: elf not found! [%s]", path.c_str());
LOGF_ERROR(HLE, "Boot error: elf not found! [%s]", path.c_str());
return;
}
Emu.Run();