diff --git a/Source/Core/Common/Src/ConsoleListener.h b/Source/Core/Common/Src/ConsoleListener.h index 2e8bffcf4b..335d73d773 100644 --- a/Source/Core/Common/Src/ConsoleListener.h +++ b/Source/Core/Common/Src/ConsoleListener.h @@ -37,14 +37,12 @@ public: void LetterSpace(int Width, int Height); void BufferWidthHeight(int BufferWidth, int BufferHeight, int ScreenWidth, int ScreenHeight, bool BufferFirst); void PixelSpace(int Left, int Top, int Width, int Height, bool); - #ifdef _WIN32 +#ifdef _WIN32 COORD GetCoordinates(int BytesRead, int BufferWidth); - #endif +#endif void Log(LogTypes::LOG_LEVELS, const char *Text); void ClearScreen(bool Cursor = true); - const char *getName() const { return "Console"; } - private: #ifdef _WIN32 HWND GetHwnd(void); diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp index 7e2275c4b1..d95e76ac5b 100644 --- a/Source/Core/Common/Src/LogManager.cpp +++ b/Source/Core/Common/Src/LogManager.cpp @@ -86,17 +86,20 @@ LogManager::LogManager() m_fileLog = new FileLogListener(File::GetUserPath(F_MAINLOG_IDX).c_str()); m_consoleLog = new ConsoleListener(); - for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) { - m_Log[i]->setEnable(true); - m_Log[i]->addListener(m_fileLog); - m_Log[i]->addListener(m_consoleLog); + for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) + { + m_Log[i]->SetEnable(true); + m_Log[i]->AddListener(m_fileLog); + m_Log[i]->AddListener(m_consoleLog); } } -LogManager::~LogManager() { - for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) { - m_logManager->removeListener((LogTypes::LOG_TYPE)i, m_fileLog); - m_logManager->removeListener((LogTypes::LOG_TYPE)i, m_consoleLog); +LogManager::~LogManager() +{ + for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) + { + m_logManager->RemoveListener((LogTypes::LOG_TYPE)i, m_fileLog); + m_logManager->RemoveListener((LogTypes::LOG_TYPE)i, m_consoleLog); } for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) @@ -107,32 +110,24 @@ LogManager::~LogManager() { } void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, - const char *file, int line, const char *format, - va_list args) { - + const char *file, int line, const char *format, va_list args) +{ char temp[MAX_MSGLEN]; char msg[MAX_MSGLEN * 2]; LogContainer *log = m_Log[type]; - if (! log->isEnable() || level > log->getLevel() || ! log->hasListeners()) + if (!log->IsEnabled() || level > log->GetLevel() || ! log->HasListeners()) return; CharArrayFromFormatV(temp, MAX_MSGLEN, format, args); static const char level_to_char[7] = "-NEWID"; sprintf(msg, "%s %s:%u %c[%s]: %s\n", - Common::Timer::GetTimeFormatted().c_str(), - file, line, level_to_char[(int)level], - log->getShortName(), temp); + Common::Timer::GetTimeFormatted().c_str(), + file, line, level_to_char[(int)level], + log->GetShortName(), temp); - std::lock_guard lk(logMutex); - log->trigger(level, msg); -} - -void LogManager::removeListener(LogTypes::LOG_TYPE type, LogListener *listener) -{ - std::lock_guard lk(logMutex); - m_Log[type]->removeListener(listener); + log->Trigger(level, msg); } void LogManager::Init() @@ -147,31 +142,33 @@ void LogManager::Shutdown() } LogContainer::LogContainer(const char* shortName, const char* fullName, bool enable) - : m_enable(enable) { + : m_enable(enable) +{ strncpy(m_fullName, fullName, 128); strncpy(m_shortName, shortName, 32); m_level = LogTypes::LWARNING; } // LogContainer -void LogContainer::addListener(LogListener *listener) { - if (!isListener(listener)) - listeners.push_back(listener); +void LogContainer::AddListener(LogListener *listener) +{ + std::lock_guard lk(m_listeners_lock); + m_listeners.insert(listener); } -void LogContainer::removeListener(LogListener *listener) { - std::vector::iterator i = std::find(listeners.begin(), listeners.end(), listener); - if (listeners.end() != i) - listeners.erase(i); +void LogContainer::RemoveListener(LogListener *listener) +{ + std::lock_guard lk(m_listeners_lock); + m_listeners.erase(listener); } -bool LogContainer::isListener(LogListener *listener) const { - return listeners.end() != std::find(listeners.begin(), listeners.end(), listener); -} +void LogContainer::Trigger(LogTypes::LOG_LEVELS level, const char *msg) +{ + std::lock_guard lk(m_listeners_lock); -void LogContainer::trigger(LogTypes::LOG_LEVELS level, const char *msg) { - std::vector::const_iterator i; - for (i = listeners.begin(); i != listeners.end(); ++i) { + std::set::const_iterator i; + for (i = m_listeners.begin(); i != m_listeners.end(); ++i) + { (*i)->Log(level, msg); } } @@ -179,13 +176,14 @@ void LogContainer::trigger(LogTypes::LOG_LEVELS level, const char *msg) { FileLogListener::FileLogListener(const char *filename) { m_logfile.open(filename, std::ios::app); - setEnable(true); + SetEnable(true); } void FileLogListener::Log(LogTypes::LOG_LEVELS, const char *msg) { - if (!m_enable || !isValid()) + if (!IsEnabled() || !IsValid()) return; + std::lock_guard lk(m_log_lock); m_logfile << msg << std::flush; } diff --git a/Source/Core/Common/Src/LogManager.h b/Source/Core/Common/Src/LogManager.h index aee4d91e7f..3f2b5cd168 100644 --- a/Source/Core/Common/Src/LogManager.h +++ b/Source/Core/Common/Src/LogManager.h @@ -23,80 +23,70 @@ #include "Thread.h" #include "FileUtil.h" -#include +#include #include #define MAX_MESSAGES 8000 #define MAX_MSGLEN 1024 -// pure virtual interface (well, except the destructor which we just leave empty). -class LogListener { +// pure virtual interface +class LogListener +{ public: virtual ~LogListener() {} + virtual void Log(LogTypes::LOG_LEVELS, const char *msg) = 0; - virtual const char *getName() const = 0; }; -class FileLogListener : public LogListener { +class FileLogListener : public LogListener +{ public: FileLogListener(const char *filename); void Log(LogTypes::LOG_LEVELS, const char *msg); - bool isValid() { - return (m_logfile != NULL); - } + bool IsValid() { return (m_logfile != NULL); } + bool IsEnabled() const { return m_enable; } + void SetEnable(bool enable) { m_enable = enable; } - bool isEnable() { - return m_enable; - } - - void setEnable(bool enable) { - m_enable = enable; - } - - const char *getName() const { return "file"; } + const char* GetName() const { return "file"; } private: + std::mutex m_log_lock; std::ofstream m_logfile; bool m_enable; }; -class LogContainer { +class LogContainer +{ public: LogContainer(const char* shortName, const char* fullName, bool enable = false); - const char *getShortName() const { return m_shortName; } - const char *getFullName() const { return m_fullName; } + const char* GetShortName() const { return m_shortName; } + const char* GetFullName() const { return m_fullName; } - bool isListener(LogListener *listener) const; - void addListener(LogListener *listener); - void removeListener(LogListener *listener); + void AddListener(LogListener* listener); + void RemoveListener(LogListener* listener); - void trigger(LogTypes::LOG_LEVELS, const char *msg); + void Trigger(LogTypes::LOG_LEVELS, const char *msg); - bool isEnable() const { return m_enable; } - void setEnable(bool enable) { - m_enable = enable; - } + bool IsEnabled() const { return m_enable; } + void SetEnable(bool enable) { m_enable = enable; } - LogTypes::LOG_LEVELS getLevel() const { - return m_level; - } + LogTypes::LOG_LEVELS GetLevel() const { return m_level; } - void setLevel(LogTypes::LOG_LEVELS level) { - m_level = level; - } - bool hasListeners() const { return listeners.size() > 0; } + void SetLevel(LogTypes::LOG_LEVELS level) { m_level = level; } + + bool HasListeners() const { return !m_listeners.empty(); } private: char m_fullName[128]; char m_shortName[32]; bool m_enable; LogTypes::LOG_LEVELS m_level; - - std::vector listeners; + std::mutex m_listeners_lock; + std::set m_listeners; }; class ConsoleListener; @@ -105,7 +95,6 @@ class LogManager : NonCopyable { private: LogContainer* m_Log[LogTypes::NUMBER_OF_LOGS]; - std::mutex logMutex; FileLogListener *m_fileLog; ConsoleListener *m_consoleLog; static LogManager *m_logManager; // Singleton. Ugh. @@ -119,49 +108,58 @@ public: void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char *file, int line, const char *fmt, va_list args); - void setLogLevel(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level) { - m_Log[type]->setLevel(level); + void SetLogLevel(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level) + { + m_Log[type]->SetLevel(level); } - void setEnable(LogTypes::LOG_TYPE type, bool enable) { - m_Log[type]->setEnable(enable); + void SetEnable(LogTypes::LOG_TYPE type, bool enable) + { + m_Log[type]->SetEnable(enable); } - bool isEnable(LogTypes::LOG_TYPE type) { - return m_Log[type]->isEnable(); + bool IsEnabled(LogTypes::LOG_TYPE type) const + { + return m_Log[type]->IsEnabled(); } - const char *getShortName(LogTypes::LOG_TYPE type) const { - return m_Log[type]->getShortName(); + const char* GetShortName(LogTypes::LOG_TYPE type) const + { + return m_Log[type]->GetShortName(); } - const char *getFullName(LogTypes::LOG_TYPE type) const { - return m_Log[type]->getFullName(); + const char* GetFullName(LogTypes::LOG_TYPE type) const + { + return m_Log[type]->GetFullName(); } - bool isListener(LogTypes::LOG_TYPE type, LogListener *listener) const { - return m_Log[type]->isListener(listener); + void AddListener(LogTypes::LOG_TYPE type, LogListener *listener) + { + m_Log[type]->AddListener(listener); } - void addListener(LogTypes::LOG_TYPE type, LogListener *listener) { - m_Log[type]->addListener(listener); + void RemoveListener(LogTypes::LOG_TYPE type, LogListener *listener) + { + m_Log[type]->RemoveListener(listener); } - void removeListener(LogTypes::LOG_TYPE type, LogListener *listener); - - FileLogListener *getFileListener() { + FileLogListener *GetFileListener() const + { return m_fileLog; } - ConsoleListener *getConsoleListener() { + ConsoleListener *GetConsoleListener() const + { return m_consoleLog; } - static LogManager* GetInstance() { + static LogManager* GetInstance() + { return m_logManager; } - static void SetInstance(LogManager *logManager) { + static void SetInstance(LogManager *logManager) + { m_logManager = logManager; } diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h index 5d3a129e8f..ba713ed64c 100644 --- a/Source/Core/Common/Src/Thread.h +++ b/Source/Core/Common/Src/Thread.h @@ -68,8 +68,7 @@ public: void Wait() { std::unique_lock lk(m_mutex); - if (!is_set) - m_condvar.wait(lk, IsSet(this)); + m_condvar.wait(lk, IsSet(this)); is_set = false; } diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp index 8096adb36a..c02ada362f 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp @@ -209,7 +209,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 u64 DVDAddress = (u64)Memory::Read_U32(_BufferIn + 0x08) << 2; // Don't do anything if the log is unselected - if (LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) + if (LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) { const char *pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) diff --git a/Source/Core/DiscIO/Src/FileMonitor.cpp b/Source/Core/DiscIO/Src/FileMonitor.cpp index 822c010364..4c23df182d 100644 --- a/Source/Core/DiscIO/Src/FileMonitor.cpp +++ b/Source/Core/DiscIO/Src/FileMonitor.cpp @@ -93,9 +93,11 @@ void ReadGC(std::string FileName) void CheckFile(std::string File, u64 Size) { // Don't do anything if the log is unselected - if (!LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) return; + if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) + return; // Do nothing if we found the same file again - if (CurrentFile == File) return; + if (CurrentFile == File) + return; if (Size > 0) Size = (Size / 1000); std::string Str = StringFromFormat("%s kB %s", ThousandSeparate(Size, 7).c_str(), File.c_str()); @@ -119,7 +121,7 @@ void FindFilename(u64 offset) // Don't do anything if a game is not running if (Core::GetState() != Core::CORE_RUN) return; // Or if the log is unselected - if (!LogManager::GetInstance()->isEnable(LogTypes::FILEMON)) return; + if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) return; if (!FileAccess) return; if (!pFileSystem || ISOFile != SConfig::GetInstance().m_LastFilename) diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index c8c1968797..4ea8ac5433 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -344,7 +344,7 @@ CFrame::CFrame(wxFrame* parent, if (ShowLogWindow) SConfig::GetInstance().m_InterfaceLogWindow = true; // Give it a console early to show potential messages from this onward - ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener(); + ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener(); if (SConfig::GetInstance().m_InterfaceConsole) Console->Open(); // Start debugging mazimized diff --git a/Source/Core/DolphinWX/Src/FrameAui.cpp b/Source/Core/DolphinWX/Src/FrameAui.cpp index b27785c39b..503d6994af 100644 --- a/Source/Core/DolphinWX/Src/FrameAui.cpp +++ b/Source/Core/DolphinWX/Src/FrameAui.cpp @@ -142,7 +142,7 @@ void CFrame::ToggleConsole(bool bShow) // If the console doesn't exist, we create it if (!GetConsoleWindow()) { - ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener(); + ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener(); Console->Open(); } else @@ -747,7 +747,7 @@ void CFrame::ResizeConsole() /*max out the width in the word wrap mode*/ 100; int WindowHeight = InternalHeight + MenuBar; // Resize buffer - ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener(); + ConsoleListener* Console = LogManager::GetInstance()->GetConsoleListener(); Console->PixelSpace(0,0, InternalWidth, InternalHeight, false); // Move the window to hide the border MoveWindow(GetConsoleWindow(), -Border-wxBorder, -MenuBar-wxBorder, diff --git a/Source/Core/DolphinWX/Src/LogConfigWindow.cpp b/Source/Core/DolphinWX/Src/LogConfigWindow.cpp index 4d64002820..f8219b179e 100644 --- a/Source/Core/DolphinWX/Src/LogConfigWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogConfigWindow.cpp @@ -69,7 +69,7 @@ void LogConfigWindow::CreateGUIControls() m_checks = new wxCheckListBox(this, wxID_ANY); _connect_macro_(m_checks, LogConfigWindow::OnLogCheck, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, this); for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++) - m_checks->Append(wxString::FromAscii(m_LogManager->getFullName((LogTypes::LOG_TYPE)i))); + m_checks->Append(wxString::FromAscii(m_LogManager->GetFullName((LogTypes::LOG_TYPE)i))); // Sizers wxStaticBoxSizer* sbOutputs = new wxStaticBoxSizer(wxVERTICAL, this, _("Logger Outputs")); @@ -110,7 +110,7 @@ void LogConfigWindow::LoadSettings() for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) { bool log_enabled; - ini.Get("Logs", m_LogManager->getShortName((LogTypes::LOG_TYPE)i), &log_enabled, true); + ini.Get("Logs", m_LogManager->GetShortName((LogTypes::LOG_TYPE)i), &log_enabled, true); if (log_enabled) enableAll = false; m_checks->Check(i, log_enabled); } @@ -126,7 +126,7 @@ void LogConfigWindow::SaveSettings() ini.Set("Options", "WriteToConsole", m_writeConsole); ini.Set("Options", "WriteToWindow", m_writeWindow); for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) - ini.Set("Logs", m_LogManager->getShortName((LogTypes::LOG_TYPE)i), m_checks->IsChecked(i)); + ini.Set("Logs", m_LogManager->GetShortName((LogTypes::LOG_TYPE)i), m_checks->IsChecked(i)); ini.Save(File::GetUserPath(F_LOGGERCONFIG_IDX)); } @@ -134,7 +134,7 @@ void LogConfigWindow::OnVerbosityChange(wxCommandEvent& event) { int v = m_verbosity->GetSelection() + 1; for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++) - m_LogManager->setLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)v); + m_LogManager->SetLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)v); event.Skip(); } @@ -146,9 +146,9 @@ void LogConfigWindow::OnWriteFileChecked(wxCommandEvent& event) if (m_checks->IsChecked(i)) { if (m_writeFile) - m_LogManager->addListener((LogTypes::LOG_TYPE)i, m_LogManager->getFileListener()); + m_LogManager->AddListener((LogTypes::LOG_TYPE)i, m_LogManager->GetFileListener()); else - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, m_LogManager->getFileListener()); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, m_LogManager->GetFileListener()); } } } @@ -161,9 +161,9 @@ void LogConfigWindow::OnWriteConsoleChecked(wxCommandEvent& event) if (m_checks->IsChecked(i)) { if (m_writeConsole) - m_LogManager->addListener((LogTypes::LOG_TYPE)i, m_LogManager->getConsoleListener()); + m_LogManager->AddListener((LogTypes::LOG_TYPE)i, m_LogManager->GetConsoleListener()); else - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, m_LogManager->getConsoleListener()); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, m_LogManager->GetConsoleListener()); } } } @@ -176,9 +176,9 @@ void LogConfigWindow::OnWriteWindowChecked(wxCommandEvent& event) if (m_checks->IsChecked(i)) { if (m_writeWindow) - m_LogManager->addListener((LogTypes::LOG_TYPE)i, (LogListener *)m_LogWindow); + m_LogManager->AddListener((LogTypes::LOG_TYPE)i, (LogListener *)m_LogWindow); else - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, (LogListener *)m_LogWindow); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, (LogListener *)m_LogWindow); } } } @@ -197,22 +197,22 @@ void LogConfigWindow::ToggleLog(int _logType, bool enable) m_checks->Check(_logType, enable); - m_LogManager->setEnable(logType, enable); + m_LogManager->SetEnable(logType, enable); if (enable) { if (m_writeWindow) - m_LogManager->addListener(logType, (LogListener *)m_LogWindow); + m_LogManager->AddListener(logType, (LogListener *)m_LogWindow); if (m_writeFile) - m_LogManager->addListener(logType, m_LogManager->getFileListener()); + m_LogManager->AddListener(logType, m_LogManager->GetFileListener()); if (m_writeConsole) - m_LogManager->addListener(logType, m_LogManager->getConsoleListener()); + m_LogManager->AddListener(logType, m_LogManager->GetConsoleListener()); } else { - m_LogManager->removeListener(logType, (LogListener *)m_LogWindow); - m_LogManager->removeListener(logType, m_LogManager->getFileListener()); - m_LogManager->removeListener(logType, m_LogManager->getConsoleListener()); + m_LogManager->RemoveListener(logType, (LogListener *)m_LogWindow); + m_LogManager->RemoveListener(logType, m_LogManager->GetFileListener()); + m_LogManager->RemoveListener(logType, m_LogManager->GetConsoleListener()); } } diff --git a/Source/Core/DolphinWX/Src/LogWindow.cpp b/Source/Core/DolphinWX/Src/LogWindow.cpp index 0097d7237e..94b542eb2f 100644 --- a/Source/Core/DolphinWX/Src/LogWindow.cpp +++ b/Source/Core/DolphinWX/Src/LogWindow.cpp @@ -87,23 +87,23 @@ void CLogWindow::CreateGUIControls() for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) { bool enable; - ini.Get("Logs", m_LogManager->getShortName((LogTypes::LOG_TYPE)i), &enable, true); + ini.Get("Logs", m_LogManager->GetShortName((LogTypes::LOG_TYPE)i), &enable, true); if (m_writeWindow && enable) - m_LogManager->addListener((LogTypes::LOG_TYPE)i, this); + m_LogManager->AddListener((LogTypes::LOG_TYPE)i, this); else - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, this); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, this); if (m_writeFile && enable) - m_LogManager->addListener((LogTypes::LOG_TYPE)i, m_LogManager->getFileListener()); + m_LogManager->AddListener((LogTypes::LOG_TYPE)i, m_LogManager->GetFileListener()); else - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, m_LogManager->getFileListener()); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, m_LogManager->GetFileListener()); if (m_writeConsole && enable) - m_LogManager->addListener((LogTypes::LOG_TYPE)i, m_LogManager->getConsoleListener()); + m_LogManager->AddListener((LogTypes::LOG_TYPE)i, m_LogManager->GetConsoleListener()); else - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, m_LogManager->getConsoleListener()); - m_LogManager->setLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)(verbosity)); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, m_LogManager->GetConsoleListener()); + m_LogManager->SetLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)(verbosity)); } // Font @@ -159,7 +159,7 @@ CLogWindow::~CLogWindow() { for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) { - m_LogManager->removeListener((LogTypes::LOG_TYPE)i, this); + m_LogManager->RemoveListener((LogTypes::LOG_TYPE)i, this); } m_LogTimer->Stop(); delete m_LogTimer; @@ -205,7 +205,7 @@ void CLogWindow::OnClear(wxCommandEvent& WXUNUSED (event)) msgQueue.pop(); } - m_LogManager->getConsoleListener()->ClearScreen(); + m_LogManager->GetConsoleListener()->ClearScreen(); } void CLogWindow::UnPopulateBottom()