// Created: 29/01/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/mac/private.h" // includes mac headers
#endif
+#if defined(__MWERKS__) && wxUSE_UNICODE
+ #include <wtime.h>
+#endif
+
+
// ----------------------------------------------------------------------------
// non member functions
// ----------------------------------------------------------------------------
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() ) ;
- strcat( (char*) pstr , ";g" ) ;
- c2pstr( (char*) pstr ) ;
+ wxString output = str + wxT(";g") ;
+ wxMacStringToPascal( output.c_str() , pstr ) ;
Boolean running = false ;
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
+#include "wx/ioswrap.h"
wxLogStream::wxLogStream(wxSTD ostream *ostr)
{
if ( ostr == NULL )
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();
}