]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/log.h
make wxSetEnv compatible with ANSI and Unicode, deprecate passing NULL to it in favou...
[wxWidgets.git] / include / wx / log.h
index 0bbcc5128058fa5e1988be77713d6c44c89fad2b..a28d31300c2dbd7d6ec3f85df68ce7dcecf7ba6f 100644 (file)
@@ -211,7 +211,7 @@ public:
     // sets the timestamp string: this is used as strftime() format string
     // for the log targets which add time stamps to the messages - set it
     // to NULL to disable time stamping completely.
-    static void SetTimestamp(const wxChar *ts) { ms_timestamp = ts; }
+    static void SetTimestamp(const wxString& ts) { ms_timestamp = ts; }
 
 
     // accessors
@@ -229,7 +229,7 @@ public:
     static wxLogLevel GetLogLevel() { return ms_logLevel; }
 
     // get the current timestamp format string (may be NULL)
-    static const wxChar *GetTimestamp() { return ms_timestamp; }
+    static const wxString& GetTimestamp() { return ms_timestamp; }
 
 
     // helpers
@@ -258,11 +258,14 @@ protected:
     virtual void DoLog(wxLogLevel level, const wxString& szString, time_t t);
 #if WXWIN_COMPATIBILITY_2_8
     // these shouldn't be used by new code
-    virtual void DoLog(wxLogLevel WXUNUSED(level),
-                       const char *WXUNUSED(szString), time_t WXUNUSED(t)) {}
-    virtual void DoLog(wxLogLevel WXUNUSED(level),
-                       const wchar_t *WXUNUSED(szString), time_t WXUNUSED(t)) {}
-#endif
+    wxDEPRECATED_BUT_USED_INTERNALLY(
+        virtual void DoLog(wxLogLevel level, const char *szString, time_t t)
+    );
+
+    wxDEPRECATED_BUT_USED_INTERNALLY(
+        virtual void DoLog(wxLogLevel level, const wchar_t *wzString, time_t t)
+    );
+#endif // WXWIN_COMPATIBILITY_2_8
 
     void LogString(const wxString& szString, time_t t)
         { DoLogString(szString, t); }
@@ -306,7 +309,7 @@ private:
 
     // format string for strftime(), if NULL, time stamping log messages is
     // disabled
-    static const wxChar *ms_timestamp;
+    static wxString    ms_timestamp;
 
     static wxTraceMask ms_ulTraceMask;   // controls wxLogTrace behaviour
     static wxArrayString ms_aTraceMasks; // more powerful filter for wxLogTrace