]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/log.cpp
Further correction in case where string value is omitted
[wxWidgets.git] / src / common / log.cpp
index b24d5dc538aec711bb2588e2e90d0c463ec45fb3..0687124fe8ab11a65d9140f9316ad257e40d5e92 100644 (file)
@@ -37,6 +37,7 @@
 #endif //WX_PRECOMP
 
 #include "wx/apptrait.h"
+#include "wx/datetime.h"
 #include "wx/file.h"
 #include "wx/msgout.h"
 #include "wx/textfile.h"
@@ -328,7 +329,7 @@ void wxLog::OnLog(wxLogLevel level, const wxChar *szString, time_t t)
             {
                 if ( GetRepetitionCounting() )
                 {
-                    pLogger->DoLogNumberOfRepeats();
+                    DoLogNumberOfRepeats();
                 }
                 ms_prevString = szString;
                 ms_prevLevel = level;
@@ -411,6 +412,7 @@ void wxLog::ClearTraceMasks()
 
 void wxLog::TimeStamp(wxString *str)
 {
+#if wxUSE_DATETIME
     if ( ms_timestamp )
     {
         wxChar buf[256];
@@ -424,6 +426,7 @@ void wxLog::TimeStamp(wxString *str)
         str->Empty();
         *str << buf << wxT(": ");
     }
+#endif // wxUSE_DATETIME
 }
 
 void wxLog::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
@@ -552,8 +555,8 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
     TimeStamp(&str);
     str << szString;
 
-    fputs(str.mb_str(), m_fp);
-    fputc(_T('\n'), m_fp);
+    wxFputs(str, m_fp);
+    wxFputc(_T('\n'), m_fp);
     fflush(m_fp);
 
     // under GUI systems such as Windows or Mac, programs usually don't have