Move wxLog::FlushActive() call from wxAppBase::ProcessIdle() to
wxAppConsoleBase::ProcessIdle().
Now that log messages from background threads are queued until the main thread
log target is flushed, we need to call wxLog::FlushActive() periodically to
see them at all, see #11115.
Besides, even though the default log target in console applications outputs
the messages immediately without queuing them, it is quite possible to use a
non-default target which does require flushing so this change also fixes a
potential bug with non-default log targets.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61712
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
event.SetEventObject(this);
ProcessEvent(event);
+#if wxUSE_LOG
+ // flush the logged messages if any (do this after processing the events
+ // which could have logged new messages)
+ wxLog::FlushActive();
+#endif
+
return event.MoreRequested();
}
node = node->GetNext();
}
-#if wxUSE_LOG
- // flush the logged messages if any
- wxLog::FlushActive();
-#endif
-
wxUpdateUIEvent::ResetUpdateTime();
return needMore;