]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxLogFormatter compilation under MSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Dec 2011 16:36:47 +0000 (16:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Dec 2011 16:36:47 +0000 (16:36 +0000)
Fix wxMSW compilation after the changes of r70086.

Closes #13792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/log.cpp

index e5070691dd430645208edab7be966f222212917e..7cc809d803653468d3edb89fdc12f390e36ca501 100644 (file)
@@ -213,7 +213,14 @@ wxLogFormatter::Format(wxLogLevel level,
                        const wxString& msg,
                        const wxLogRecordInfo& info) const
 {
-    wxString prefix = FormatTime(info.timestamp);
+    wxString prefix;
+
+    // don't time stamp debug messages under MSW as debug viewers usually
+    // already have an option to do it
+#ifdef __WXMSW__
+    if ( level != wxLOG_Debug && level != wxLOG_Trace )
+#endif // __WXMSW__
+        prefix = FormatTime(info.timestamp);
 
     switch ( level )
     {
@@ -247,13 +254,7 @@ wxString
 wxLogFormatter::FormatTime(time_t t) const
 {
     wxString str;
-
-    // don't time stamp debug messages under MSW as debug viewers usually
-    // already have an option to do it
-#ifdef __WXMSW__
-    if ( level != wxLOG_Debug && level != wxLOG_Trace )
-#endif // __WXMSW__
-        wxLog::TimeStamp(&str, t);
+    wxLog::TimeStamp(&str, t);
 
     return str;
 }