From 3a57b93d37c767bd83e6fc5bb00f4a5ae78f2ef1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 26 Jul 2001 09:06:35 +0000 Subject: [PATCH] timestampt trace/debug messages under Unix too, this is useful for debugging git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/logg.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 0564199d09..e3ee75a4c0 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -336,19 +336,21 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t) case wxLOG_Debug: #ifdef __WXDEBUG__ { + wxString str; + TimeStamp(&str); + str += szString; + #if defined(__WXMSW__) && !defined(__WXMICROWIN__) // don't prepend debug/trace here: it goes to the - // debug window anyhow, but do put a timestamp - wxString str; - TimeStamp(&str); - str << szString << wxT("\r\n"); + // debug window anyhow + str += wxT("\r\n"); OutputDebugString(str); #else // send them to stderr - wxFprintf(stderr, wxT("%s: %s\n"), + wxFprintf(stderr, wxT("[%s] %s\n"), level == wxLOG_Trace ? wxT("Trace") : wxT("Debug"), - szString); + str.c_str()); fflush(stderr); #endif } -- 2.45.2