+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+ #pragma interface "log.h"
+#endif
+
+#include "wx/defs.h"
+
+// ----------------------------------------------------------------------------
+// common constants for use in wxUSE_LOG/!wxUSE_LOG
+// ----------------------------------------------------------------------------
+
+// the trace masks have been superceded by symbolic trace constants, they're
+// for compatibility only andwill be removed soon - do NOT use them
+
+// meaning of different bits of the trace mask (which allows selectively
+// enable/disable some trace messages)
+#define wxTraceMemAlloc 0x0001 // trace memory allocation (new/delete)
+#define wxTraceMessages 0x0002 // trace window messages/X callbacks
+#define wxTraceResAlloc 0x0004 // trace GDI resource allocation
+#define wxTraceRefCount 0x0008 // trace various ref counting operations
+
+#ifdef __WXMSW__
+ #define wxTraceOleCalls 0x0100 // OLE interface calls
+#endif
+
+// ----------------------------------------------------------------------------
+// types
+// ----------------------------------------------------------------------------
+
+// NB: these types are needed even if wxUSE_LOG == 0
+typedef unsigned long wxTraceMask;
+typedef unsigned long wxLogLevel;
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/string.h"
+
+#if wxUSE_LOG
+
+#include "wx/arrstr.h"
+
+#ifndef __WXWINCE__
+ #include <time.h> // for time_t
+#endif
+
+#include "wx/dynarray.h"
+
+#ifndef wxUSE_LOG_DEBUG
+# ifdef __WXDEBUG__
+# define wxUSE_LOG_DEBUG 1
+# else // !__WXDEBUG__
+# define wxUSE_LOG_DEBUG 0
+# endif
+#endif
+
+// ----------------------------------------------------------------------------
+// forward declarations
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+ class WXDLLIMPEXP_CORE wxTextCtrl;
+ class WXDLLIMPEXP_CORE wxLogFrame;
+ class WXDLLIMPEXP_CORE wxFrame;
+ class WXDLLIMPEXP_CORE wxWindow;
+#endif // wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// different standard log levels (you may also define your own)
+enum
+{
+ wxLOG_FatalError, // program can't continue, abort immediately
+ wxLOG_Error, // a serious error, user must be informed about it
+ wxLOG_Warning, // user is normally informed about it but may be ignored
+ wxLOG_Message, // normal message (i.e. normal output of a non GUI app)
+ wxLOG_Status, // informational: might go to the status line of GUI app
+ wxLOG_Info, // informational message (a.k.a. 'Verbose')
+ wxLOG_Debug, // never shown to the user, disabled in release mode
+ wxLOG_Trace, // trace messages are also only enabled in debug mode
+ wxLOG_Progress, // used for progress indicator (not yet)
+ wxLOG_User = 100, // user defined levels start here
+ wxLOG_Max = 10000
+};
+
+// symbolic trace masks - wxLogTrace("foo", "some trace message...") will be
+// discarded unless the string "foo" has been added to the list of allowed
+// ones with AddTraceMask()
+
+#define wxTRACE_MemAlloc wxT("memalloc") // trace memory allocation (new/delete)
+#define wxTRACE_Messages wxT("messages") // trace window messages/X callbacks
+#define wxTRACE_ResAlloc wxT("resalloc") // trace GDI resource allocation
+#define wxTRACE_RefCount wxT("refcount") // trace various ref counting operations
+
+#ifdef __WXMSW__
+ #define wxTRACE_OleCalls wxT("ole") // OLE interface calls
+#endif
+
+#include "wx/iosfwrap.h"