From: Vadim Zeitlin Date: Fri, 17 Jun 2005 11:45:25 +0000 (+0000) Subject: don't show wxLogDebug during app startup output in msg box X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/83250f1a2b8c16bd69f0cdea7cf8ffe658d66b6d don't show wxLogDebug during app startup output in msg box git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/log.h b/include/wx/log.h index 4f23682b55..13230917c6 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -302,6 +302,7 @@ public: virtual void Flush(); protected: + virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t); virtual void DoLogString(const wxChar *szString, time_t t); private: diff --git a/src/common/log.cpp b/src/common/log.cpp index 0471c87c76..e8b718f05f 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -536,6 +536,30 @@ void wxLogBuffer::Flush() } } +void wxLogBuffer::DoLog(wxLogLevel level, const wxChar *szString, time_t t) +{ + switch ( level ) + { + case wxLOG_Trace: + case wxLOG_Debug: +#ifdef __WXDEBUG__ + // don't put debug messages in the buffer, we don't want to show + // them to the user in a msg box, log them immediately + { + wxString str; + TimeStamp(&str); + str += szString; + + wxMessageOutputDebug().Printf(_T("%s\n"), str.c_str()); + } +#endif // __WXDEBUG__ + break; + + default: + wxLog::DoLog(level, szString, t); + } +} + void wxLogBuffer::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) { m_str << szString << _T("\n");