]> git.saurik.com Git - wxWidgets.git/commitdiff
Flush log messages from other threads on shutdown too.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Oct 2012 22:38:32 +0000 (22:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Oct 2012 22:38:32 +0000 (22:38 +0000)
Add a call to wxLog::FlushActive() to the shutdown code as calling just
wxLog::SetActiveTarget(NULL) is not enough, it flushes the current log target
only but not the ones used by other threads.

Closes #14595.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp

index 7b836cd88e5c410fee45ae9cea7f88b8e2e45b08..ee45254523a7b28c38c3e72ea8f011fb793aac6d 100644 (file)
@@ -410,6 +410,11 @@ static void DoCommonPostCleanup()
     delete wxMessageOutput::Set(NULL);
 
 #if wxUSE_LOG
+    // call this first as it has a side effect: in addition to flushing all
+    // logs for this thread, it also flushes everything logged from other
+    // threads
+    wxLog::FlushActive();
+
     // and now delete the last logger as well
     //
     // we still don't disable log target auto-vivification even if any log