- #ifdef __DEBUG__
- #ifdef __WIN32__
- OutputDebugString(szString);
- OutputDebugString("\n\r");
- #else //!WIN32
- // send them to stderr
- fprintf(stderr, level == wxLOG_Trace ? "Trace: %s\n"
- : "Debug: %s\n", szString);
- fflush(stderr);
- #endif // WIN32
+ #ifdef __WXDEBUG__
+ {
+ 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
+ }