git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1896
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxLogStderr::DoLogString(const char *szString)
{
void wxLogStderr::DoLogString(const char *szString)
{
- fputs(szString, m_fp);
- fputc('\n', m_fp);
+ wxString str(szString);
+ str << '\n';
+
+ fputs(str, m_fp);
+
+ // under Windows, programs usually don't have stderr at all, so make show the
+ // messages also under debugger
+#ifdef __WXMSW__
+ OutputDebugString(str + '\r');
+#endif // MSW
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
OutputDebugString(strTime + szString + "\n\r");
#else
// send them to stderr
OutputDebugString(strTime + szString + "\n\r");
#else
// send them to stderr
fprintf(stderr, "%s %s: %s\n",
strTime.c_str(),
fprintf(stderr, "%s %s: %s\n",
strTime.c_str(),
- level == wxLOG_Trace ? _("Trace") : _("Debug"),
- szString);
- */
- fprintf(stderr, "%s\n",
+ level == wxLOG_Trace ? "Trace" : "Debug",
szString);
fflush(stderr);
#endif
}
szString);
fflush(stderr);
#endif
}
break;
case wxLOG_FatalError:
break;
case wxLOG_FatalError:
// He-e-e-e-elp!! we're trapped in endless loop
Trap();
// He-e-e-e-elp!! we're trapped in endless loop
Trap();