X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06405ac80bdf421357a5eb84f757739a5a58b571..5de5db0eb14aa86b5b177050720deb0f4c210fba:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index 6a4bf7bf0d..52e44a77e1 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -52,6 +52,8 @@ #ifdef __WXMSW__ #include + // Redefines OutputDebugString if necessary + #include "wx/msw/private.h" #else //Unix #include #endif //Win/Unix @@ -256,6 +258,8 @@ wxLog *wxLog::GetActiveTarget() // ask the application to create a log target for us if ( wxTheApp != NULL ) ms_pLogger = wxTheApp->CreateLogTarget(); + else + ms_pLogger = new wxLogStderr; #endif s_bInGetActiveTarget = FALSE; @@ -338,8 +342,11 @@ void wxLog::DoLog(wxLogLevel level, const char *szString) case wxLOG_Trace: case wxLOG_Debug: #ifdef __WXDEBUG__ - DoLogString(str << (level == wxLOG_Trace ? _("Trace") : _("Debug")) - << ": " << szString); + // DoLogString(str << (level == wxLOG_Trace ? _("Trace") : _("Debug")) + // << ": " << szString); + // JACS: we don't really want to prefix with 'Debug'. It's just extra + // verbiage. + DoLogString(szString); #endif break; @@ -506,10 +513,14 @@ void wxLogGui::DoLog(wxLogLevel level, const char *szString) OutputDebugString(strTime + szString + "\n\r"); #else // send them to stderr + /* fprintf(stderr, "%s %s: %s\n", strTime.c_str(), level == wxLOG_Trace ? _("Trace") : _("Debug"), szString); + */ + fprintf(stderr, "%s\n", + szString); fflush(stderr); #endif }