X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cdaa5f25111febb2959f6673378de99af47c8e4..a4ea083bbdf710d3234dcbd2eafb5d0e078f8348:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index 53ce213b50..f74d88d9f8 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -856,8 +855,10 @@ wxLogStderr::wxLogStderr(FILE *fp) void wxLogStderr::DoLogText(const wxString& msg) { - wxFputs(msg + '\n', m_fp); - fflush(m_fp); + // First send it to stderr, even if we don't have it (e.g. in a Windows GUI + // application under) it's not a problem to try to use it and it's easier + // than determining whether we do have it or not. + wxMessageOutputStderr(m_fp).Output(msg); // under GUI systems such as Windows or Mac, programs usually don't have // stderr at all, so show the messages also somewhere else, typically in