removed wxLog::HasPendingMessages() (it can't be made to work correctly with wxLogChain); don't send the messages going to a log file to debug output under MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -351,7 +351,6 @@ void WXDLLEXPORT wxLogSysError(long lErrCode, const wxChar *szFormat, ...)
|
||||
|
||||
wxLog::wxLog()
|
||||
{
|
||||
m_bHasMessages = FALSE;
|
||||
}
|
||||
|
||||
wxChar *wxLog::SetLogBuffer( wxChar *buf, size_t size)
|
||||
@@ -493,8 +492,7 @@ void wxLog::DoLogString(const wxChar *WXUNUSED(szString), time_t WXUNUSED(t))
|
||||
|
||||
void wxLog::Flush()
|
||||
{
|
||||
// remember that we don't have any more messages to show
|
||||
m_bHasMessages = FALSE;
|
||||
// nothing to do here
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -706,11 +704,17 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
|
||||
fflush(m_fp);
|
||||
|
||||
// under Windows, programs usually don't have stderr at all, so show the
|
||||
// messages also under debugger - unless it's a console program
|
||||
// messages also under debugger (unless it's a console program which does
|
||||
// have stderr or unless this is a file logger which doesn't use stderr at
|
||||
// all)
|
||||
#if defined(__WXMSW__) && wxUSE_GUI && !defined(__WXMICROWIN__)
|
||||
str += wxT("\r\n") ;
|
||||
OutputDebugString(str.c_str());
|
||||
if ( m_fp == stderr )
|
||||
{
|
||||
str += wxT("\r\n") ;
|
||||
OutputDebugString(str.c_str());
|
||||
}
|
||||
#endif // MSW
|
||||
|
||||
#if defined(__WXMAC__) && !defined(__DARWIN__) && wxUSE_GUI
|
||||
Str255 pstr ;
|
||||
strcpy( (char*) pstr , str.c_str() ) ;
|
||||
@@ -793,7 +797,7 @@ void wxLogChain::Flush()
|
||||
if ( m_logOld )
|
||||
m_logOld->Flush();
|
||||
|
||||
// be careful to avoid inifinite recursion
|
||||
// be careful to avoid infinite recursion
|
||||
if ( m_logNew && m_logNew != this )
|
||||
m_logNew->Flush();
|
||||
}
|
||||
|
Reference in New Issue
Block a user