]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/log.cpp
drawing optimization fix
[wxWidgets.git] / src / common / log.cpp
index 6a4bf7bf0d07ecb9f2b8794a73f15a96f5a62487..52e44a77e182b1828c3a00529350481d896bd714 100644 (file)
@@ -52,6 +52,8 @@
 
 #ifdef  __WXMSW__
   #include  <windows.h>
+  // Redefines OutputDebugString if necessary
+  #include  "wx/msw/private.h"
 #else   //Unix
   #include  <signal.h>
 #endif  //Win/Unix
@@ -256,6 +258,8 @@ wxLog *wxLog::GetActiveTarget()
         // ask the application to create a log target for us
         if ( wxTheApp != NULL )
           ms_pLogger = wxTheApp->CreateLogTarget();
+        else
+          ms_pLogger = new wxLogStderr;
       #endif
 
       s_bInGetActiveTarget = FALSE;
@@ -338,8 +342,11 @@ void wxLog::DoLog(wxLogLevel level, const char *szString)
     case wxLOG_Trace:
     case wxLOG_Debug:
       #ifdef __WXDEBUG__
-        DoLogString(str << (level == wxLOG_Trace ? _("Trace") : _("Debug"))
-                        << ": " << szString);
+      //        DoLogString(str << (level == wxLOG_Trace ? _("Trace") : _("Debug"))
+      //                        << ": " << szString);
+      // JACS: we don't really want to prefix with 'Debug'. It's just extra
+      // verbiage.
+              DoLogString(szString);
       #endif
 
       break;
@@ -506,10 +513,14 @@ void wxLogGui::DoLog(wxLogLevel level, const char *szString)
               OutputDebugString(strTime + szString + "\n\r");
           #else  
             // send them to stderr
+    /*
             fprintf(stderr, "%s %s: %s\n",
                     strTime.c_str(),
                     level == wxLOG_Trace ? _("Trace") : _("Debug"),
                     szString);
+     */
+            fprintf(stderr, "%s\n",
+                    szString);
             fflush(stderr);
           #endif
         }