- #ifdef __WIN32__
- OutputDebugString(szString);
- OutputDebugString("\n\r");
- #else //!WIN32
- // send them to stderr
- fprintf(stderr, "%s: %s\n",
- level == wxLOG_Trace ? _("Trace") : _("Debug"), szString);
- fflush(stderr);
- #endif // WIN32
+ {
+ wxString strTime = TimeStamp();
+
+ #ifdef __WIN32__
+ // don't prepend debug/trace here: it goes to the debug window
+ // anyhow, but do put a timestamp
+ OutputDebugString(strTime + szString + "\n\r");
+ #else //!WIN32
+ // send them to stderr
+ fprintf(stderr, "%s %s: %s\n",
+ strTime.c_str(),
+ level == wxLOG_Trace ? _("Trace") : _("Debug"),
+ szString);
+ fflush(stderr);
+ #endif // WIN32
+ }