]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/log.h
take into account the width of the static box label in wxStaticBoxSizer minimal size...
[wxWidgets.git] / interface / wx / log.h
index fa6d09912027a579d3bc5fb6ab14dbd4b148fb4a..34cbf28abbf681f38222b22859790cc058d2b4de 100644 (file)
@@ -763,7 +763,7 @@ public:
     /**
         Returns the current timestamp format string.
     */
-    static const wxString GetTimestamp();
+    static const wxString& GetTimestamp();
 
     /**
         Returns the current trace mask, see Customization() section for details.
@@ -775,7 +775,7 @@ public:
 
         @see AddTraceMask().
     */
-    static const wxArrayString GetTraceMasks();
+    static const wxArrayString& GetTraceMasks();
 
     /**
         Returns whether the verbose mode is currently active.
@@ -793,7 +793,7 @@ public:
         Forwards the message at specified level to the @e DoLog() function of the
         active log target if there is any, does nothing otherwise.
     */
-    static void OnLog(wxLogLevel level, const wxString& message);
+    static void OnLog(wxLogLevel level, const wxString& msg, time_t t);
 
     /**
         Remove the @a mask from the list of allowed masks for
@@ -874,6 +874,34 @@ public:
     */
     static void Suspend();
 
+    /**
+        Log the given message.
+
+        This function should only be called from the DoLog() implementations in
+        the derived classes (which can't call wxLog::DoLog() directly as it is
+        protected), it should not be used for logging new messages which can be
+        only sent to the currently active logger using OnLog() which also
+        checks if the logging (for this level) is enabled while this method
+        just directly calls DoLog().
+
+        Example of use of this class from wxLogChain:
+        @code
+        void wxLogChain::DoLog(wxLogLevel level, const wxString& msg, time_t t)
+        {
+            // let the previous logger show it
+            if ( m_logOld && IsPassingMessages() )
+                m_logOld->Log(level, msg, t);
+
+            // and also send it to the new one
+            if ( m_logNew && m_logNew != this )
+                m_logNew->Log(level, msg, t);
+        }
+        @endcode
+
+        @since 2.9.0
+     */
+    void Log(wxLogLevel level, const wxString& msg, time_t timestamp);
+
 protected:
 
     /**
@@ -967,7 +995,7 @@ public:
 // Global functions/macros
 // ============================================================================
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 
 /**
@@ -1013,7 +1041,7 @@ const wxChar* wxSysErrorMsg(unsigned long errCode = 0);
 
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     For all normal, informational messages. They also appear in a message box
@@ -1025,7 +1053,7 @@ void wxLogMessage(const char* formatString, ... );
 void wxVLogMessage(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     For verbose output. Normally, it is suppressed, but might be activated if
@@ -1038,7 +1066,7 @@ void wxLogVerbose(const char* formatString, ... );
 void wxVLogVerbose(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     For warnings - they are also normally shown to the user, but don't
@@ -1050,7 +1078,7 @@ void wxLogWarning(const char* formatString, ... );
 void wxVLogWarning(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     Like wxLogError(), but also terminates the program with the exit code 3.
@@ -1063,7 +1091,7 @@ void wxLogFatalError(const char* formatString, ... );
 void wxVLogFatalError(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     The functions to use for error messages, i.e. the messages that must be
@@ -1076,7 +1104,7 @@ void wxLogError(const char* formatString, ... );
 void wxVLogError(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     Like wxLogDebug(), trace functions only do something in debug builds and
@@ -1095,7 +1123,7 @@ void wxLogTrace(const char* formatString, ... );
 void wxVLogTrace(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     Like wxLogDebug(), trace functions only do something in debug builds and
@@ -1138,7 +1166,7 @@ void wxVLogTrace(const char* mask,
                   va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     Like wxLogDebug(), trace functions only do something in debug builds and
@@ -1170,7 +1198,7 @@ void wxLogTrace(wxTraceMask mask, const char* formatString, ... );
 void wxVLogTrace(wxTraceMask mask, const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     The right functions for debug output. They only do something in debug mode
@@ -1183,7 +1211,7 @@ void wxLogDebug(const char* formatString, ... );
 void wxVLogDebug(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     Messages logged by this function will appear in the statusbar of the
@@ -1200,7 +1228,7 @@ void wxLogStatus(const char* formatString, ... );
 void wxVLogStatus(const char* formatString, va_list argPtr);
 //@}
 
-/** @ingroup group_funcmacro_log */
+/** @addtogroup group_funcmacro_log */
 //@{
 /**
     Mostly used by wxWidgets itself, but might be handy for logging errors