wxLog::wxLog()
{
- m_bHasMessages = FALSE;
}
wxChar *wxLog::SetLogBuffer( wxChar *buf, size_t size)
void wxLog::Flush()
{
- // remember that we don't have any more messages to show
- m_bHasMessages = FALSE;
+ // nothing to do here
}
// ----------------------------------------------------------------------------
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() ) ;
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();
}