git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43078
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif //WX_PRECOMP
#include "wx/apptrait.h"
+#include "wx/datetime.h"
#include "wx/file.h"
#include "wx/msgout.h"
#include "wx/textfile.h"
void wxLog::TimeStamp(wxString *str)
{
+#if wxUSE_DATETIME
if ( ms_timestamp )
{
wxChar buf[256];
str->Empty();
*str << buf << wxT(": ");
}
+#endif // wxUSE_DATETIME
}
void wxLog::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
// allows to exclude the usage of wxDateTime
static wxString TimeStamp(const wxChar *format, time_t t)
{
+#if wxUSE_DATETIME
wxChar buf[4096];
struct tm tm;
if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
wxFAIL_MSG(_T("strftime() failed"));
}
return wxString(buf);
+#else // !wxUSE_DATETIME
+ return wxEmptyString;
+#endif // wxUSE_DATETIME/!wxUSE_DATETIME
}