X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e90c1d2a19361551eb07778280f22be3e759cf64..272cd5dddb860829b6a0beb004570a6a1c0a6ccc:/include/wx/log.h diff --git a/include/wx/log.h b/include/wx/log.h index 842f1ad487..c000ac1274 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -132,6 +132,13 @@ public: bool HasPendingMessages() const { return m_bHasMessages; } // only one sink is active at each moment + // flush the active target if any + static void FlushActive() + { + wxLog *log = GetActiveTarget(); + if ( log ) + log->Flush(); + } // get current log target, will call wxApp::CreateLogTarget() to // create one if none exists static wxLog *GetActiveTarget(); @@ -473,12 +480,12 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // will take us immediately to the place of the failed API #ifdef __VISUALC__ #define wxLogApiError(api, rc) \ - wxLogDebug(T("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ + wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc)) #else // !VC++ #define wxLogApiError(api, rc) \ - wxLogDebug(T("In file %s at line %d: '%s' failed with " \ + wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \ "error 0x%08lx (%s)."), \ __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc))