]> git.saurik.com Git - wxWidgets.git/commitdiff
don't show wxLogDebug during app startup output in msg box
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 17 Jun 2005 11:45:25 +0000 (11:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 17 Jun 2005 11:45:25 +0000 (11:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/log.h
src/common/log.cpp

index 4f23682b55cbd27b9f6a5d3936bad8f81813b4cd..13230917c645bf29fa9dae7aa9c5bffc96d872f2 100644 (file)
@@ -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:
index 0471c87c7646952b51226ba21b4c30d627a927e2..e8b718f05f4b89323f108cc0f358bbce2b123b71 100644 (file)
@@ -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");