diff options
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-x | indra/newview/llviewerwindow.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2cb8e6a3ab..8e5d577968 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -261,7 +261,7 @@ std::string LLViewerWindow::sMovieBaseName; LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity"); -class RecordToChatConsole : public LLError::Recorder, public LLSingleton<RecordToChatConsole> +class RecordToChatConsoleRecorder : public LLError::Recorder { public: virtual void recordMessage(LLError::ELevel level, @@ -285,6 +285,22 @@ public: } }; +class RecordToChatConsole : public LLSingleton<RecordToChatConsole> +{ +public: + RecordToChatConsole() + : LLSingleton<RecordToChatConsole>(), + mRecorder(new RecordToChatConsoleRecorder()) + { + } + + void startRecorder() { LLError::addRecorder(mRecorder); } + void stopRecorder() { LLError::removeRecorder(mRecorder); } + +private: + LLError::RecorderPtr mRecorder; +}; + //////////////////////////////////////////////////////////////////////////// // // LLDebugText @@ -1889,11 +1905,11 @@ void LLViewerWindow::initBase() // optionally forward warnings to chat console/chat floater // for qa runs and dev builds #if !LL_RELEASE_FOR_DOWNLOAD - LLError::addRecorder(RecordToChatConsole::getInstance()); + RecordToChatConsole::getInstance()->startRecorder(); #else if(gSavedSettings.getBOOL("QAMode")) { - LLError::addRecorder(RecordToChatConsole::getInstance()); + RecordToChatConsole::getInstance()->startRecorder(); } #endif @@ -2040,8 +2056,7 @@ void LLViewerWindow::initWorldUI() void LLViewerWindow::shutdownViews() { // clean up warning logger - LLError::removeRecorder(RecordToChatConsole::getInstance()); - + RecordToChatConsole::getInstance()->stopRecorder(); LL_INFOS() << "Warning logger is cleaned." << LL_ENDL ; delete mDebugText; |