X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a44f3b5a890fbb2a88ef9adafd94f662e1664889..6362d82b3ed82aa6795e4ad03160820f94c9e4d4:/interface/wx/log.h diff --git a/interface/wx/log.h b/interface/wx/log.h index ef8b2a9d83..fa6d099120 100644 --- a/interface/wx/log.h +++ b/interface/wx/log.h @@ -6,6 +6,41 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// + +/** + Different standard log levels (you may also define your own) used with + wxLog::OnLog() by standard wxLog functions wxLogError(), wxLogWarning(), + etc... +*/ +enum wxLogLevelValues +{ + 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 +}; + +/** + The type used for trace masks. +*/ +typedef unsigned long wxTraceMask; + +/** + The type used to specify a log level. + + Default values of ::wxLogLevel used by wxWidgets are contained in the + ::wxLogLevelValues enumeration. +*/ +typedef unsigned long wxLogLevel; + + /** @class wxLogWindow @@ -396,7 +431,7 @@ public: Constructs a log target which sends all the log messages to the given output stream. If it is @NULL, the messages are sent to @c cerr. */ - wxLogStream(std::ostream ostr = NULL); + wxLogStream(std::ostream *ostr = NULL); }; @@ -445,6 +480,11 @@ public: class wxLogBuffer : public wxLog { public: + /** + The default ctor does nothing. + */ + wxLogBuffer(); + /** Shows all the messages collected so far to the user (using a message box in the GUI applications or by printing them out to the console in text mode) and @@ -780,8 +820,8 @@ public: static wxLog* SetActiveTarget(wxLog* logtarget); /** - Specifies that log messages with level logLevel should be ignored - and not sent to the active log target. + Specifies that log messages with level greater (numerically) than + @a logLevel should be ignored and not sent to the active log target. */ static void SetLogLevel(wxLogLevel logLevel); @@ -1106,6 +1146,7 @@ void wxVLogTrace(const char* mask, function is that usually there are a lot of trace messages, so it might make sense to separate them from other debug messages. + @deprecated This version of wxLogTrace() only logs the message if all the bits corresponding to the @a mask are set in the wxLog trace mask which can be set by calling wxLog::SetTraceMask(). This version is less flexible than