From d993e05b2dca1092b98936c7f3b4917c41922d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 19 Jun 2007 14:51:10 +0000 Subject: [PATCH] wxLog::Get/Settimestamp() now use wxString git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/log.tex | 4 ++-- include/wx/log.h | 6 +++--- src/common/log.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/latex/wx/log.tex b/docs/latex/wx/log.tex index 77e8803c11..41fd6f6700 100644 --- a/docs/latex/wx/log.tex +++ b/docs/latex/wx/log.tex @@ -341,7 +341,7 @@ Returns whether the repetition counting mode is enabled. \membersection{wxLog::SetTimestamp}\label{wxlogsettimestamp} -\func{void}{SetTimestamp}{\param{const char * }{ format}} +\func{void}{SetTimestamp}{\param{const wxStrgin\&}{ format}} Sets the timestamp format prepended by the default log targets to all messages. The string may contain any normal characters as well as \% @@ -350,7 +350,7 @@ Passing a NULL value (not empty string) to this function disables message timest \membersection{wxLog::GetTimestamp}\label{wxloggettimestamp} -\constfunc{const char *}{GetTimestamp}{\void} +\constfunc{const wxString\&}{GetTimestamp}{\void} Returns the current timestamp format string. diff --git a/include/wx/log.h b/include/wx/log.h index 992b2c321b..a28d31300c 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -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 @@ -309,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 diff --git a/src/common/log.cpp b/src/common/log.cpp index c0272fcc10..f120d6440d 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -906,7 +906,7 @@ wxLogLevel wxLog::ms_logLevel = wxLOG_Max; // log everything by defaul size_t wxLog::ms_suspendCount = 0; -const wxChar *wxLog::ms_timestamp = wxT("%X"); // time only, no date +wxString wxLog::ms_timestamp(wxT("%X")); // time only, no date wxTraceMask wxLog::ms_ulTraceMask = (wxTraceMask)0; wxArrayString wxLog::ms_aTraceMasks;