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
This commit is contained in:
@@ -336,19 +336,21 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
|||||||
case wxLOG_Debug:
|
case wxLOG_Debug:
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
{
|
{
|
||||||
#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;
|
wxString str;
|
||||||
TimeStamp(&str);
|
TimeStamp(&str);
|
||||||
str << szString << wxT("\r\n");
|
str += szString;
|
||||||
|
|
||||||
|
#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
|
||||||
|
// don't prepend debug/trace here: it goes to the
|
||||||
|
// debug window anyhow
|
||||||
|
str += wxT("\r\n");
|
||||||
OutputDebugString(str);
|
OutputDebugString(str);
|
||||||
#else
|
#else
|
||||||
// send them to stderr
|
// send them to stderr
|
||||||
wxFprintf(stderr, wxT("%s: %s\n"),
|
wxFprintf(stderr, wxT("[%s] %s\n"),
|
||||||
level == wxLOG_Trace ? wxT("Trace")
|
level == wxLOG_Trace ? wxT("Trace")
|
||||||
: wxT("Debug"),
|
: wxT("Debug"),
|
||||||
szString);
|
str.c_str());
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user