X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbaa16de075ca1f81ee663f11a67cecf4c0eb7bd..9a958328220b25226d259e43791eee4b06fe86ef:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index 250b7b3924..262477de40 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -490,7 +490,17 @@ unsigned wxLog::LogLastRepeatIfNeededUnlocked() wxLog::~wxLog() { - LogLastRepeatIfNeeded(); + // Flush() must be called before destroying the object as otherwise some + // messages could be lost + if ( ms_prevCounter ) + { + wxMessageOutputDebug().Printf + ( + wxS("Last repeated message (\"%s\", %lu times) wasn't output"), + ms_prevString, + ms_prevCounter + ); + } } /* static */ @@ -705,7 +715,7 @@ void wxLog::DoLogString(const wxString& szString, time_t t) void wxLog::Flush() { - // nothing to do here + LogLastRepeatIfNeeded(); } /*static*/ bool wxLog::IsAllowedTraceMask(const wxString& mask)