void SetVerbose(bool bVerbose = TRUE) { m_bVerbose = bVerbose; }
// should GetActiveTarget() try to create a new log object if the
// current is NULL?
- static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; }
+ static void DontCreateOnDemand();
// trace mask (see wxTraceXXX constants for details)
static void SetTraceMask(wxTraceMask ulMask) { ms_ulTraceMask = ulMask; }
static void AddTraceMask(const wxString& str) { ms_aTraceMasks.Add(str); }
// add string trace mask
static void RemoveTraceMask(const wxString& str);
+ // remove all string trace masks
+ static void ClearTraceMasks();
// sets the timestamp string: this is used as strftime() format string
// for the log targets which add time stamps to the messages - set it
{
public:
// redirect log output to an ostream
- wxLogStream(ostream *ostr = (ostream *) NULL);
+ wxLogStream(wxSTD ostream *ostr = (wxSTD ostream *) NULL);
protected:
// implement sink function
virtual void DoLogString(const wxChar *szString, time_t t);
// using ptr here to avoid including <iostream.h> from this file
- ostream *m_ostr;
+ wxSTD ostream *m_ostr;
};
#endif
#if wxUSE_GUI
+#if wxUSE_TEXTCTRL
+
// log everything to a text window (GUI only of course)
class WXDLLEXPORT wxLogTextCtrl : public wxLog
{
wxTextCtrl *m_pTextCtrl;
};
+#endif // wxUSE_TEXTCTRL
+
// ----------------------------------------------------------------------------
// GUI log target, the default one for wxWindows programs
// ----------------------------------------------------------------------------
+
+#if wxUSE_LOGGUI
+
class WXDLLEXPORT wxLogGui : public wxLog
{
public:
m_bWarnings; // any warnings?
};
+#endif // wxUSE_LOGGUI
+
// ----------------------------------------------------------------------------
// (background) log window: this class forwards all log messages to the log
// target which was active when it was instantiated, but also collects them
// to the log window. This window has it's own menu which allows the user to
// close it, clear the log contents or save it to the file.
// ----------------------------------------------------------------------------
+
+#if wxUSE_LOGWINDOW
+
class WXDLLEXPORT wxLogWindow : public wxLog
{
public:
wxLogFrame *m_pLogFrame; // the log frame
};
+#endif // wxUSE_LOGWINDOW
+
#endif // wxUSE_GUI
// ----------------------------------------------------------------------------